Skip to content

Commit

Permalink
Form: Only add the ViewHelper decorator for hidden form fields
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
Johannes Meyer committed Oct 1, 2015
1 parent 1c38fdd commit 209c084
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions library/Icinga/Web/Form.php
Expand Up @@ -916,12 +916,16 @@ public function createElement($type, $name, $options = null)
|| ($type === 'button' && isset($options['type']) && $options['type'] === 'submit'))
) {
array_splice($options['decorators'], 1, 0, array(array('Spinner', array('separator' => ''))));
} elseif ($type === 'hidden') {
$options['decorators'] = array('ViewHelper');
}
}
} else {
$options = array('decorators' => static::$defaultElementDecorators);
if ($type === 'submit') {
array_splice($options['decorators'], 1, 0, array(array('Spinner', array('separator' => ''))));
} elseif ($type === 'hidden') {
$options['decorators'] = array('ViewHelper');
}
}

Expand Down
4 changes: 0 additions & 4 deletions public/css/icinga/forms.less
Expand Up @@ -12,10 +12,6 @@ input {
}
}

.control-group ~ input[type="hidden"] {
display: none;
}

input.search {
padding-left: 20px;
background: @gray-lightest url('../img/icons/search.png') no-repeat 2px;
Expand Down

0 comments on commit 209c084

Please sign in to comment.