Skip to content

Commit

Permalink
[FIX #6626] add tinymce editor to resource text areas
Browse files Browse the repository at this point in the history
(cherry picked from commit 45bb0dc)
  • Loading branch information
afabiani committed Nov 10, 2020
1 parent e807d63 commit 5e4579a
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions geonode/base/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,28 @@ def build_attrs(self, base_attrs=None, extra_attrs=None, **kwargs):

class ResourceBaseForm(TranslationModelForm):
"""Base form for metadata, should be inherited by childres classes of ResourceBase"""
abstract = forms.CharField(widget=TinyMCE())
purpose = forms.CharField(widget=TinyMCE())
constraints_other = forms.CharField(widget=TinyMCE())
supplemental_information = forms.CharField(widget=TinyMCE())
data_quality_statement = forms.CharField(widget=TinyMCE())
abstract = forms.CharField(
label=_("Abstract"),
required=False,
widget=TinyMCE())
purpose = forms.CharField(
label=_("Purpose"),
required=False,
widget=TinyMCE())
constraints_other = forms.CharField(
label=_("Other constraints"),
required=False,
widget=TinyMCE())
supplemental_information = forms.CharField(
label=_('Supplemental information'),
required=False,
widget=TinyMCE())
data_quality_statement = forms.CharField(
label=_("Data quality statement"),
required=False,
widget=TinyMCE())
owner = forms.ModelChoiceField(
empty_label="Owner",
empty_label=_("Owner"),
label=_("Owner"),
required=False,
queryset=get_user_model().objects.exclude(username='AnonymousUser'),
Expand Down

0 comments on commit 5e4579a

Please sign in to comment.