Skip to content

Commit

Permalink
Improve form styling slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed Oct 15, 2014
1 parent 38ee467 commit d1ea7e8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
10 changes: 5 additions & 5 deletions library/Icinga/Web/Form.php
Expand Up @@ -100,11 +100,11 @@ class Form extends Zend_Form
* @var array
*/
public static $defaultElementDecorators = array(
'ViewHelper',
'Errors',
array('Description', array('tag' => 'span', 'class' => 'description')),
'Label',
array('HtmlTag', array('tag' => 'div'))
array('ViewHelper', array('separator' => '')),
array('Errors', array('separator' => '')),
array('Description', array('tag' => 'span', 'class' => 'description', 'separator' => '')),
array('Label', array('separator' => '')),
array('HtmlTag', array('tag' => 'div', 'class' => 'element'))
);

/**
Expand Down
8 changes: 6 additions & 2 deletions public/css/icinga/forms.less
Expand Up @@ -24,7 +24,6 @@ td.configTable {
label {
display: block;
font-weight: bold;
margin-bottom: 0.3em;
}

input, select {
Expand Down Expand Up @@ -115,7 +114,7 @@ form.link-like input[type="submit"]:hover, form.link-like input[type="submit"]:f

form ul.errors {
list-style-type: none;
margin: 0;
margin: 0.3em 0 0 0.6em;
padding: 0;
}

Expand All @@ -125,6 +124,10 @@ form ul.errors li {
line-height: 1.5em;
}

form div.element {
margin: 0.5em 0;
}

form label {
display: inline-block;
margin-right: 1em;
Expand All @@ -138,6 +141,7 @@ select, input[type=text] {

form .description {
font-size: 0.8em;
margin: 0.3em 0 0 0.6em;
}

.description {
Expand Down
6 changes: 5 additions & 1 deletion public/css/icinga/login.less
Expand Up @@ -51,6 +51,10 @@
color: @colorTextDefault;
}

.form div.element {
margin: 0;
}

.form label {
font-weight: normal;
display: inline-block;
Expand Down Expand Up @@ -83,7 +87,7 @@
color: #eee;
border-color: #777;
background: #777;
margin-left: 10.1em;
margin-left: 9.9em;
}

input[type=submit]:hover, a.button:hover, input[type=submit]:focus {
Expand Down

0 comments on commit d1ea7e8

Please sign in to comment.