920 extra_context = context, |
920 extra_context = context, |
921 ) |
921 ) |
922 |
922 |
923 |
923 |
924 class SettingsTextForm(ModelForm): |
924 class SettingsTextForm(ModelForm): |
|
925 from django.utils.safestring import mark_safe |
|
926 category_1 = forms.CharField(label=_("Label for the first category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '<span style="width: 2px; height: 5px; background-color: #1523f4"> </span><br />' + _("Leave blank to use the value configured for the workspace.") + '<br />' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + '<em>none</em>'), required=False) |
|
927 category_2 = forms.CharField(label=ugettext_lazy("Label for the second category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '<span style="width: 2px; height: 5px; background-color: #f4154f"> </span><br />' + _("Leave blank to use the value configured for the workspace.") + '<br />' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + '<em>none</em>'), required=False) |
|
928 category_3 = forms.CharField(label=ugettext_lazy("Label for the third category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '<span style="width: 2px; height: 5px; background-color: #09ff09"> </span><br />' + _("Leave blank to use the value configured for the workspace.") + '<br />' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + '<em>none</em>'), required=False) |
|
929 category_4 = forms.CharField(label=ugettext_lazy("Label for the fourth category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '<span style="width: 2px; height: 5px; background-color: #bc39cf"> </span><br />' + _("Leave blank to use the value configured for the workspace.") + '<br />' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + '<em>none</em>'), required=False) |
|
930 category_5 = forms.CharField(label=ugettext_lazy("Label for the fifth category of comments"), help_text=mark_safe(_("Paragraphs including at least one comment of this category will have a vertical bar with this color: ") + '<span style="width: 2px; height: 5px; background-color: #ffbd08"> </span><br />' + _("Leave blank to use the value configured for the workspace.") + '<br />' + _("To disable this category for this text whatever the configuration for the workspace, enter: ") + '<em>none</em>'), required=False) |
925 # example name = forms.CharField(label=_("Name (optional)"), widget=forms.TextInput, required=False) |
931 # example name = forms.CharField(label=_("Name (optional)"), widget=forms.TextInput, required=False) |
926 |
932 |
927 class Meta: |
933 class Meta: |
928 model = TextVersion |
934 model = TextVersion |
929 fields = ('mod_posteriori', 'category_1', 'category_2', 'category_3', 'category_4', 'category_5') |
935 fields = ('mod_posteriori', 'category_1', 'category_2', 'category_3', 'category_4', 'category_5') |