Commit 8b8fec93 by niskac

merged heads

parents fbe3d257 09f7814f
......@@ -530,11 +530,16 @@ input,
button,
select,
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: normal;
line-height: 18px;
}
input,
button,
select,
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
label {
display: block;
margin-bottom: 5px;
......
......@@ -42,7 +42,13 @@ input,
button,
select,
textarea {
#font > .sans-serif(@baseFontSize,normal,@baseLineHeight);
#font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
}
input,
button,
select,
textarea {
#font > #family > .sans-serif(); // And only set font-family here for those that need it (note the missing label element)
}
// Identify controls by their labels
......
......@@ -372,10 +372,8 @@ class BootActiveForm extends CActiveForm
if (!isset($htmlOptions['class']))
$htmlOptions['class'] = $this->errorMessageCssClass;
$tag = $this->inlineErrors ? 'span' : 'p';
if (!$enableAjaxValidation && !$enableClientValidation)
return $this->getErrorHtml($model, $attribute, $htmlOptions, $tag);
return $this->getErrorHtml($model, $attribute, $htmlOptions);
$id = CHtml::activeId($model,$attribute);
$inputID = isset($htmlOptions['inputID']) ? $htmlOptions['inputID'] : $id;
......@@ -434,7 +432,7 @@ class BootActiveForm extends CActiveForm
$option['clientValidation']="js:function(value, messages, attribute) {\n".implode("\n",$validators)."\n}";
}
$html = $this->getErrorHtml($model, $attribute, $htmlOptions, $tag);
$html = $this->getErrorHtml($model, $attribute, $htmlOptions);
if ($html === '')
{
......@@ -460,18 +458,13 @@ class BootActiveForm extends CActiveForm
* @see CModel::getErrors
* @see errorMessageCss
*/
public static function getErrorHtml($model, $attribute, $htmlOptions = array(), $tag = 'span')
public static function getErrorHtml($model, $attribute, $htmlOptions = array())
{
CHtml::resolveName($model, $attribute);
$error = $model->getError($attribute);
if ($error !== null)
{
if (!isset($htmlOptions['class']))
$htmlOptions['class'] = 'help-inline';
return CHtml::tag($tag, $htmlOptions, $error); // Bootstrap errors must be spans
}
return CHtml::tag('span', $htmlOptions, $error); // Bootstrap errors must be spans
else
return '';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment