BUGFIX: fixed conflict with field and method naming. Removed unneeded field from model

This commit is contained in:
Will Rossiter 2009-12-06 22:41:47 +00:00
parent 3e3cb21f6d
commit 71d0d4223d
2 changed files with 3 additions and 4 deletions

View File

@ -18,8 +18,7 @@ class EditableFormField extends DataObject {
"CanDelete" => "Boolean",
"CustomErrorMessage" => "Varchar(255)",
"CustomRules" => "Text",
"CustomSettings" => "Text",
"ShowOnLoad" => "Boolean"
"CustomSettings" => "Text"
);
static $defaults = array(
@ -86,7 +85,7 @@ class EditableFormField extends DataObject {
*
* @return bool
*/
function ShowOnLoad() {
function getShowOnLoad() {
return ($this->getSetting('ShowOnLoad') == "Show" || $this->getSetting('ShowOnLoad') == '') ? true : false;
}

View File

@ -73,7 +73,7 @@
<li>
<a href="#" class="addCondition" title="<% _t('ADD', 'Add') %>"><% _t('ADDRULE', 'Add Rule') %></a>
</li>
<li class="addCustomRule">
<li class="addCustomRule">
<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>