forked from expo/troggle
Added help writing HTML in the cave editing form. Made the HTML previews optional
This commit is contained in:
@@ -11,6 +11,8 @@ from django.contrib.admin.widgets import AdminDateWidget
|
||||
from troggle.core.models.troggle import Person, PersonExpedition, Expedition
|
||||
from troggle.core.models.caves import Cave, LogbookEntry, QM, Entrance, CaveAndEntrance
|
||||
|
||||
from troggle.core.views.editor_helpers import HTMLarea
|
||||
|
||||
'''These are all the class-based Forms used by troggle.
|
||||
There are other, simpler, upload forms in view/uploads.py
|
||||
Some are not used and need renovating or destroying.
|
||||
@@ -24,15 +26,22 @@ class CaveForm(ModelForm):
|
||||
the other fields are present on the form, but use the default presentation style
|
||||
'''
|
||||
official_name = forms.CharField(required = False, widget=forms.TextInput(attrs={'size': '45'}))
|
||||
underground_description = forms.CharField(required = False, widget=forms.Textarea(attrs={'rows':9}))
|
||||
explorers = forms.CharField(required = False, widget=forms.Textarea(attrs={'rows':2}))
|
||||
equipment = forms.CharField(required = False, widget=forms.Textarea(attrs={'rows':2}))
|
||||
survey = forms.CharField(required = False, widget=forms.Textarea(attrs={'rows':2}))
|
||||
underground_description = forms.CharField(required = False, widget=HTMLarea(
|
||||
attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"}))
|
||||
explorers = forms.CharField(required = False, widget=HTMLarea(
|
||||
attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"}))
|
||||
equipment = forms.CharField(required = False, widget=HTMLarea(
|
||||
attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"}))
|
||||
survey = forms.CharField(required = False, widget=HTMLarea(
|
||||
attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"}))
|
||||
#survey = forms.CharField(required = False, widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
|
||||
kataster_status = forms.CharField(required = False)
|
||||
underground_centre_line = forms.CharField(required = False, widget=forms.Textarea(attrs={'rows':2}))
|
||||
notes = forms.CharField(required = False, widget=forms.Textarea(attrs={'rows':2}))
|
||||
references = forms.CharField(required = False, widget=forms.Textarea(attrs={'rows':1}))
|
||||
underground_centre_line = forms.CharField(required = False, widget=HTMLarea(
|
||||
attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"}))
|
||||
notes = forms.CharField(required = False, widget=HTMLarea(
|
||||
attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"}))
|
||||
references = forms.CharField(required = False, widget=HTMLarea(
|
||||
attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"}))
|
||||
description_file = forms.CharField(required = False, widget=forms.TextInput(attrs={'size': '45'}))
|
||||
survex_file = forms.CharField(required = False, label="Survex file [caves-1623/000/000.svx]", widget=forms.TextInput(attrs={'size': '45'}))
|
||||
url = forms.CharField(required = True, label="URL [1623/000/000]", widget=forms.TextInput(attrs={'size': '45'}))
|
||||
|
||||
Reference in New Issue
Block a user