Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUG Fieldgroup styling

  • Loading branch information...
commit fefb7af0f55430a049825736c76bda04f0dd4372 1 parent 541436f
ARNHOE ARNHOE authored
5 admin/css/screen.css
View
@@ -231,7 +231,10 @@ form.small .field input.text, form.small .field textarea, form.small .field sele
/** ---------------------------------------------------- Grouped form fields ---------------------------------------------------- */
.fieldgroup .fieldgroup-field { float: left; display: block; padding: 8px 8px 0 0; }
.fieldgroup .fieldgroup-field .field { border: none; padding-bottom: 0; }
-.fieldgroup .fieldgroup-field label { margin-left: 0; margin-right: 1em; width: auto; }
+.fieldgroup .fieldgroup-field .fieldholder-small { padding: 0 0 8px 0; }
+.fieldgroup .fieldgroup-field .fieldgroup input.text, .fieldgroup .fieldgroup-field .fieldgroup textarea, .fieldgroup .fieldgroup-field .fieldgroup select, .fieldgroup .fieldgroup-field .fieldgroup .TreeDropdownField { margin-left: 0; }
+.fieldgroup .fieldgroup-field .fieldholder-small-label { display: block; }
+.fieldgroup .fieldgroup-field label { padding: 8px 8px 8px 0; margin-left: 0; margin-right: 1em; width: auto; }
.fieldgroup.stacked .fieldgroup-field { float: none; }
.ss-toggle { margin: 8px 0; }
15 admin/scss/_forms.scss
View
@@ -508,7 +508,22 @@ form.small .field, .field.small {
padding-bottom: 0;
}
+ .fieldholder-small {
+ padding: 0 0 $grid-y 0;
+ }
+
+ .fieldgroup input.text, .fieldgroup textarea, .fieldgroup select, .fieldgroup .TreeDropdownField {
+ margin-left: 0;
+ }
+
+ // Style specific label with display block, otherwise
+ // checkbox falls under the text
+ .fieldholder-small-label {
+ display: block;
+ }
+
label {
+ padding: $grid-y $grid-x $grid-y 0;
margin-left: 0;
margin-right: 1em;
width: auto;
2  templates/forms/CompositeField_holder_small.ss
View
@@ -1,4 +1,4 @@
-<$Tag class="field CompositeField $extraClass <% if ColumnCount %>multicolumn<% end_if %>">
+<$Tag class="CompositeField $extraClass <% if ColumnCount %>multicolumn<% end_if %>">
<% if $Tag == 'fieldset' && $Legend %>
<legend>$Legend</legend>
<% end_if %>
12 templates/forms/FormField_holder_small.ss
View
@@ -1,11 +1,5 @@
<div class="fieldholder-small">
- <% if $RightTitle %>
- <label class="right fieldholder-small-label" <% if $ID %>for="$ID"<% end_if %>>$RightTitle</label>
- <% else_if $LeftTitle %>
- <label class="left fieldholder-small-label" <% if $ID %>for="$ID"<% end_if %>>$LeftTitle</label>
- <% else_if $Title %>
- <label class="fieldholder-small-label" <% if $ID %>for="$ID"<% end_if %>>$Title</label>
- <% end_if %>
-
+ <label class="fieldholder-small-label" <% if $ID %>for="$ID"<% end_if %>>$Title</label>
$Field
-</div>
+ <% if $RightTitle %><label class="right fieldholder-small-label" <% if $ID %>for="$ID"<% end_if %>>$RightTitle</label><% end_if %>
+</div>
Please sign in to comment.
Something went wrong with that request. Please try again.