CSS hide when ShowOnLoad false

This commit is contained in:
michael3dgoo 2017-05-08 06:38:31 +09:30
parent c37f3dcfc5
commit 4451d0c94d
3 changed files with 9 additions and 3 deletions

View File

@ -766,9 +766,6 @@ JS
$result .= <<<EOS
\n
//Initial state
$('{$target}').{$initialState}();
$('.userform').on('{$events}',
"{$selectors}",
function (){

View File

@ -862,6 +862,11 @@ class EditableFormField extends DataObject
$field->addExtraClass($this->ExtraClass);
}
// if ShowOnLoad is false hide the field
if (!$this->ShowOnLoad) {
$field->addExtraClass($this->ShowOnLoadNice());
}
// if this field has a placeholder
if ($this->Placeholder) {
$field->setAttribute('placeholder', $this->Placeholder);

View File

@ -72,3 +72,7 @@
margin-bottom: 5px;
font-weight: bold;
}
.userform .field.hide {
display: none;
}