Merge pull request #2275 from ARNHOE/3.1-updatefieldgroupstyle

BUG Fieldgroup styling
This commit is contained in:
Ingo Schommer 2013-08-15 12:14:05 -07:00
commit eb17cf3eb9
4 changed files with 23 additions and 11 deletions

View File

@ -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; }

View File

@ -505,7 +505,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;

View File

@ -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 %>

View File

@ -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 %>
<% if $Title %><label class="fieldholder-small-label" <% if $ID %>for="$ID"<% end_if %>>$Title</label><% end_if %>
$Field
</div>
<% if $RightTitle %><label class="right fieldholder-small-label" <% if $ID %>for="$ID"<% end_if %>>$RightTitle</label><% end_if %>
</div>