backoffice: use godo for backoffice info text (#68150) #1214
|
@ -46,12 +46,12 @@ from wcs.qommon.form import (
|
|||
Form,
|
||||
HtmlWidget,
|
||||
RadiobuttonsWidget,
|
||||
RichTextWidget,
|
||||
SingleSelectWidget,
|
||||
SlugWidget,
|
||||
StringWidget,
|
||||
UrlWidget,
|
||||
VarnameWidget,
|
||||
WysiwygTextWidget,
|
||||
)
|
||||
from wcs.sql_criterias import Equal
|
||||
from wcs.workflows import (
|
||||
|
@ -991,7 +991,7 @@ class WorkflowStatusPage(Directory):
|
|||
value=(self.status.forced_endpoint is True),
|
||||
)
|
||||
form.add(
|
||||
WysiwygTextWidget,
|
||||
RichTextWidget,
|
||||
'backoffice_info_text',
|
||||
title=_('Information text for backoffice'),
|
||||
value=self.status.backoffice_info_text,
|
||||
|
@ -1590,7 +1590,7 @@ class GlobalActionPage(WorkflowStatusPage):
|
|||
def options(self):
|
||||
form = Form(enctype='multipart/form-data')
|
||||
form.add(
|
||||
WysiwygTextWidget,
|
||||
RichTextWidget,
|
||||
'backoffice_info_text',
|
||||
title=_('Information text for backoffice'),
|
||||
value=self.action.backoffice_info_text,
|
||||
|
|
|
@ -81,6 +81,7 @@ class RootDirectory(AccessControlled, Directory):
|
|||
except KeyError:
|
||||
pass
|
||||
get_response().add_javascript(['jquery.js', 'qommon.js', 'gadjo.js'])
|
||||
get_response().add_css_include('../xstatic/css/godo.css')
|
||||
|
||||
if path and path[0] == 'categories':
|
||||
# legacy /backoffice/categories/<...>, redirect.
|
||||
return redirect('/backoffice/forms/' + '/'.join(path))
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{% extends "qommon/forms/widget.html" %}
|
||||
{% block widget-control %}
|
||||
<textarea hidden id="form_{{widget.get_name_for_id}}" name="{{widget.name}}">
|
||||
{{widget.value|default:""}}
|
||||
</textarea>
|
||||
<textarea hidden id="form_{{widget.get_name_for_id}}" name="{{widget.name}}">{{widget.value|default:""}}</textarea>
|
||||
fpeters
commented
Un test échouait parce qu'à regarder le contenu du textarea il y avait des espaces, ça les retire. (plutôt que modifier le test pour y ajouter un strip()). Un test échouait parce qu'à regarder le contenu du textarea il y avait des espaces, ça les retire. (plutôt que modifier le test pour y ajouter un strip()).
|
||||
<godo-editor
|
||||
style="width: 100%"
|
||||
{% for attr in widget.attrs.items %}{{attr.0}}="{{attr.1}}" {% endfor %}
|
||||
|
|
Loading…
Reference in New Issue
Le composant js de godo ne se charge pas d'ajouter la partie CSS; plutôt qu'au cas par cas, pour les pages qui pourraient charger une popup qui pourrait contenir godo, ça ajoute de manière systématique la CSS.