Commits

Christoffer Niska committed a4343fe Merge

merged heads

  • Participants
  • Parent commits 5d1fc5b, b534b4d
  • Branches bootstrap-2.0.1

Comments (0)

Files changed (4)

File assets/css/bootstrap.min.css

 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;

File lib/bootstrap/less/forms.less

 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

File widgets/BootActiveForm.php

 		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;
 				$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 === '')
 		{
 	 * @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 '';
 	}

File widgets/BootButtonColumn.php

 	{
 		parent::initDefaultButtons();
 
-		if ($this->viewButtonIcon !== false)
-			$this->buttons['view']['icon'] = $this->viewButtonIcon;
-		if ($this->updateButtonIcon !== false)
-			$this->buttons['update']['icon'] = $this->updateButtonIcon;
-		if ($this->deleteButtonIcon !== false)
-			$this->buttons['delete']['icon'] = $this->deleteButtonIcon;
+        if ($this->viewButtonIcon !== false && !isset($this->buttons['view']['icon']))
+            $this->buttons['view']['icon'] = $this->viewButtonIcon;
+        if ($this->updateButtonIcon !== false && !isset($this->buttons['update']['icon']))
+            $this->buttons['update']['icon'] = $this->updateButtonIcon;
+        if ($this->deleteButtonIcon !== false && !isset($this->buttons['delete']['icon']))
+            $this->buttons['delete']['icon'] = $this->deleteButtonIcon;
 	}
 
 	/**