fix vertical alignment pb. with descr. format list and textarea inputs
--- a/web/formfields.py Wed May 13 12:15:03 2009 +0200
+++ b/web/formfields.py Wed May 13 15:55:08 2009 +0200
@@ -247,6 +247,8 @@
def render(self, form, renderer):
format_field = self.get_format_field(form)
if format_field:
+ # XXX we want both fields to remain vertically aligned
+ format_field.widget.attrs['style'] = 'display: block'
result = format_field.render(form, renderer)
else:
result = u''
--- a/web/test/unittest_form.py Wed May 13 12:15:03 2009 +0200
+++ b/web/test/unittest_form.py Wed May 13 15:55:08 2009 +0200
@@ -109,7 +109,7 @@
def test_richtextfield_1(self):
self.req.use_fckeditor = lambda: False
- self._test_richtextfield('''<select id="description_format:%(eid)s" name="description_format:%(eid)s" size="1" tabindex="0">
+ self._test_richtextfield('''<select id="description_format:%(eid)s" name="description_format:%(eid)s" size="1" style="display: block" tabindex="0">
<option value="text/cubicweb-page-template">text/cubicweb-page-template</option>
<option value="text/html">text/html</option>
<option value="text/plain">text/plain</option>
@@ -119,7 +119,7 @@
def test_richtextfield_2(self):
self.req.use_fckeditor = lambda: True
- self._test_richtextfield('<input name="description_format:%(eid)s" type="hidden" value="text/rest"/><textarea cols="80" cubicweb:type="wysiwyg" id="description:%(eid)s" name="description:%(eid)s" onkeypress="autogrow(this)" rows="20" tabindex="0"/>')
+ self._test_richtextfield('<input name="description_format:%(eid)s" style="display: block" type="hidden" value="text/rest"/><textarea cols="80" cubicweb:type="wysiwyg" id="description:%(eid)s" name="description:%(eid)s" onkeypress="autogrow(this)" rows="20" tabindex="0"/>')
def test_filefield(self):