BUGFIX: fixed issue with multi select fields not mantaining dropdown values and styling

This commit is contained in:
Will Rossiter 2009-06-25 05:07:00 +00:00
parent 34dd5bf86f
commit 2fb5441019
2 changed files with 4 additions and 4 deletions

View File

@ -266,7 +266,6 @@ class EditableFormField extends DataObject {
$this->CustomRules = "";
$this->CustomSettings = "";
$this->ShowOnLoad = (isset($data['ShowOnLoad']) && $data['ShowOnLoad'] == "Show") ? 1 : 0;
// custom settings
if(isset($data['CustomSettings'])) {
$this->setFieldSettings($data['CustomSettings']);

View File

@ -66,16 +66,17 @@
<% end_control %>
</fieldset>
<% end_if %>
<fieldset class="customRules fieldOptionsGroup">
<fieldset class="customRules fieldOptionsGroup">
<legend>Custom Rules</legend>
<ul id="$FieldName.Attr-customRules">
<ul id="{$FieldName}-customRules">
<li>
<a href="#" class="addCondition" title="<% _t('ADD', 'Add') %>">
Add Rule
</a>
</li>
<li class="addCustomRule">
<select name="$FieldName.Attr[CustomSettings][ShowOnLoad]">
<select name="{$FieldName}[CustomSettings][ShowOnLoad]">
<option value="Show" <% if ShowOnLoad %>selected="selected"<% end_if %>><% _t('SHOW', 'Show') %></option>
<option value="Hide" <% if ShowOnLoad %><% else %>selected="selected"<% end_if %>><% _t('HIDE', 'Hide') %></option>
</select>