Commit 8b8fec93 by niskac

merged heads

parents fbe3d257 09f7814f
...@@ -530,11 +530,16 @@ input, ...@@ -530,11 +530,16 @@ input,
button, button,
select, select,
textarea { textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: normal;
line-height: 18px; line-height: 18px;
} }
input,
button,
select,
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
label { label {
display: block; display: block;
margin-bottom: 5px; margin-bottom: 5px;
......
...@@ -42,7 +42,13 @@ input, ...@@ -42,7 +42,13 @@ input,
button, button,
select, select,
textarea { 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 // Identify controls by their labels
......
...@@ -372,10 +372,8 @@ class BootActiveForm extends CActiveForm ...@@ -372,10 +372,8 @@ class BootActiveForm extends CActiveForm
if (!isset($htmlOptions['class'])) if (!isset($htmlOptions['class']))
$htmlOptions['class'] = $this->errorMessageCssClass; $htmlOptions['class'] = $this->errorMessageCssClass;
$tag = $this->inlineErrors ? 'span' : 'p';
if (!$enableAjaxValidation && !$enableClientValidation) if (!$enableAjaxValidation && !$enableClientValidation)
return $this->getErrorHtml($model, $attribute, $htmlOptions, $tag); return $this->getErrorHtml($model, $attribute, $htmlOptions);
$id = CHtml::activeId($model,$attribute); $id = CHtml::activeId($model,$attribute);
$inputID = isset($htmlOptions['inputID']) ? $htmlOptions['inputID'] : $id; $inputID = isset($htmlOptions['inputID']) ? $htmlOptions['inputID'] : $id;
...@@ -434,7 +432,7 @@ class BootActiveForm extends CActiveForm ...@@ -434,7 +432,7 @@ class BootActiveForm extends CActiveForm
$option['clientValidation']="js:function(value, messages, attribute) {\n".implode("\n",$validators)."\n}"; $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 === '') if ($html === '')
{ {
...@@ -460,18 +458,13 @@ class BootActiveForm extends CActiveForm ...@@ -460,18 +458,13 @@ class BootActiveForm extends CActiveForm
* @see CModel::getErrors * @see CModel::getErrors
* @see errorMessageCss * @see errorMessageCss
*/ */
public static function getErrorHtml($model, $attribute, $htmlOptions = array(), $tag = 'span') public static function getErrorHtml($model, $attribute, $htmlOptions = array())
{ {
CHtml::resolveName($model, $attribute); CHtml::resolveName($model, $attribute);
$error = $model->getError($attribute); $error = $model->getError($attribute);
if ($error !== null) if ($error !== null)
{ return CHtml::tag('span', $htmlOptions, $error); // Bootstrap errors must be spans
if (!isset($htmlOptions['class']))
$htmlOptions['class'] = 'help-inline';
return CHtml::tag($tag, $htmlOptions, $error); // Bootstrap errors must be spans
}
else else
return ''; 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