From dfd3c807c32a24d5e02849ecd3f6e3cd17130b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 31 Aug 2018 21:03:46 +0200 Subject: [PATCH] forms: update WidgetList to use generic widget render() method (#26009) --- wcs/qommon/form.py | 10 +++------- wcs/qommon/static/css/qommon.css | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wcs/qommon/form.py b/wcs/qommon/form.py index 8243183c6..42ab1b393 100644 --- a/wcs/qommon/form.py +++ b/wcs/qommon/form.py @@ -1264,11 +1264,10 @@ class WidgetList(quixote.form.widget.WidgetList): get_response().add_javascript(['jquery.js', 'widget_list.js']) def render(self): + return render(self) + + def render_content(self): r = TemplateIO(html=True) - if self.attrs: - r += htmltag('div', **self.attrs) - r += self.render_title(self.get_title()) - r += self.render_error(self.get_error()) add_element_widget = self.get_widget('add_element') add_element_widget.render_br = False add_element_widget.extra_css_class = 'list-add' @@ -1277,9 +1276,6 @@ class WidgetList(quixote.form.widget.WidgetList): continue r += widget.render() r += add_element_widget.render() - r += self.render_hint(self.get_hint()) - if self.attrs: - r += htmltext('') return r.getvalue() class WidgetDict(quixote.form.widget.WidgetDict): diff --git a/wcs/qommon/static/css/qommon.css b/wcs/qommon/static/css/qommon.css index b5a732a71..adb5c271b 100644 --- a/wcs/qommon/static/css/qommon.css +++ b/wcs/qommon/static/css/qommon.css @@ -144,6 +144,10 @@ div.widget { clear: both; } +form div.widget.SingleSelectWidgetWithOther div.widget { + margin-bottom: 0; +} + input[type="submit"][name="submit"] { font-weight: bold; box-shadow: 1px 0px 5px rgba(0, 0, 0, 0.21); -- 2.19.0.rc1