Merge pull request #585 from 3Dgoo/578-css-show-on-load

CSS hide when ShowOnLoad false
This commit is contained in:
Robbie Averill 2017-05-08 09:50:32 +12:00 committed by GitHub
commit e31af08c7e
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;
}