[mb-commits] r11149 - in mb_server/branches/TemplateToolkit/root: forms/widgets static/styles
root at musicbrainz.org
root at musicbrainz.org
Tue Jan 27 21:26:05 UTC 2009
Author: acid2
Date: 2009-01-27 21:26:05 +0000 (Tue, 27 Jan 2009)
New Revision: 11149
Modified:
mb_server/branches/TemplateToolkit/root/forms/widgets/select.tt
mb_server/branches/TemplateToolkit/root/static/styles/forms.css
Log:
Fix display of radio buttons
Modified: mb_server/branches/TemplateToolkit/root/forms/widgets/select.tt
===================================================================
--- mb_server/branches/TemplateToolkit/root/forms/widgets/select.tt 2009-01-27 21:25:33 UTC (rev 11148)
+++ mb_server/branches/TemplateToolkit/root/forms/widgets/select.tt 2009-01-27 21:26:05 UTC (rev 11149)
@@ -1,10 +1,13 @@
[%- IF field.select_widget == 'radio' -%]
+ <div class="fields">
[%- FOREACH option IN field.options -%]
- <input type="radio" id="[% id %]" name="[% name %]"
+ [% r_id = "${id}-${loop.count}" -%]
+ <input type="radio" id="[% r_id %]" name="[% name %]"
[%- IF field.value == option.value -%]checked="checked"[%- END -%]
value="[% option.value %]" />
- [% option.label %]<br/>
+ [%- INCLUDE 'forms/label.tt' for=r_id label=option.label %]<br/>
[%- END -%]
+ </div>
[%- ELSE -%]
<select id="[% id %]"
name="[% name %]"
Modified: mb_server/branches/TemplateToolkit/root/static/styles/forms.css
===================================================================
--- mb_server/branches/TemplateToolkit/root/static/styles/forms.css 2009-01-27 21:25:33 UTC (rev 11148)
+++ mb_server/branches/TemplateToolkit/root/static/styles/forms.css 2009-01-27 21:26:05 UTC (rev 11149)
@@ -38,7 +38,8 @@
}
/* Labels that are not the main label for a row (ie, checkbox) */
-#content form.generic .no_label label {
+#content form.generic .no_label label,
+#content form.generic .fields label {
width: auto;
float: none;
text-align: left;
More information about the MusicBrainz-commits
mailing list