186 help_text=(ugettext_lazy("Change the roles available in the workspace")), |
186 help_text=(ugettext_lazy("Change the roles available in the workspace")), |
187 choices=role_models_choices, |
187 choices=role_models_choices, |
188 required=False, |
188 required=False, |
189 ) |
189 ) |
190 |
190 |
|
191 workspace_category_1 = forms.CharField(label=ugettext_lazy("Label for the first category of comments"), |
|
192 help_text=mark_safe(ugettext_lazy("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>'), |
|
193 widget=forms.TextInput, |
|
194 required=False, |
|
195 max_length=20, |
|
196 ) |
|
197 workspace_category_2 = forms.CharField(label=ugettext_lazy("Label for the second category of comments"), |
|
198 help_text=mark_safe(ugettext_lazy("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>'), |
|
199 widget=forms.TextInput, |
|
200 required=False, |
|
201 max_length=20, |
|
202 ) |
|
203 workspace_category_3 = forms.CharField(label=ugettext_lazy("Label for the third category of comments"), |
|
204 help_text=mark_safe(ugettext_lazy("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>'), |
|
205 widget=forms.TextInput, |
|
206 required=False, |
|
207 max_length=20, |
|
208 ) |
|
209 workspace_category_4 = forms.CharField(label=ugettext_lazy("Label for the fourth category of comments"), |
|
210 help_text=mark_safe(ugettext_lazy("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>'), |
|
211 widget=forms.TextInput, |
|
212 required=False, |
|
213 max_length=20, |
|
214 ) |
|
215 workspace_category_5 = forms.CharField(label=ugettext_lazy("Label for the fifth category of comments"), |
|
216 help_text=mark_safe(ugettext_lazy("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>'), |
|
217 widget=forms.TextInput, |
|
218 required=False, |
|
219 max_length=20, |
|
220 ) |
191 |
221 |
192 # fields to save in the Configuration objects |
222 # fields to save in the Configuration objects |
193 conf_fields = ['workspace_name', 'workspace_tagline', 'workspace_registration', 'workspace_registration_moderation', 'workspace_role_model'] |
223 conf_fields = ['workspace_name', 'workspace_tagline', 'workspace_registration', 'workspace_registration_moderation', 'workspace_role_model', 'workspace_category_1', 'workspace_category_2', 'workspace_category_3', 'workspace_category_4', 'workspace_category_5'] |
194 |
224 |
195 |
225 |
196 @has_global_perm('can_manage_workspace') |
226 @has_global_perm('can_manage_workspace') |
197 def settingss(request): |
227 def settingss(request): |
198 if request.method == 'POST': |
228 if request.method == 'POST': |