Commits

Christoffer Niska committed 57732f8

Renamed a file and some methods.

Renamed BootInputBlock to BootInput.
Renamed all the block methods in BootActiveForm to row.

Comments (0)

Files changed (6)

gii/bootstrap/BootstrapCode.php

 Yii::import('gii.generators.crud.CrudCode');
 class BootstrapCode extendS CrudCode
 {
-	public function generateActiveBlock($modelClass, $column)
+	public function generateActiveRow($modelClass, $column)
 	{
 		if ($column->type === 'boolean')
 			return "\$form->checkBoxBlock(\$model,'{$column->name}')";

gii/bootstrap/templates/default/_form.php

 	if($column->autoIncrement)
 		continue;
 ?>
-	<?php echo "<?php echo ".$this->generateActiveBlock($this->modelClass,$column)."; ?>\n"; ?>
+	<?php echo "<?php echo ".$this->generateActiveRow($this->modelClass,$column)."; ?>\n"; ?>
 
 <?php
 }

gii/bootstrap/templates/default/_search.php

 	if(strpos($field,'password')!==false)
 		continue;
 ?>
-	<?php echo "<?php echo ".$this->generateActiveBlock($this->modelClass,$column)."; ?>\n"; ?>
+	<?php echo "<?php echo ".$this->generateActiveRow($this->modelClass,$column)."; ?>\n"; ?>
 
 <?php endforeach; ?>
 	<div class="actions">

widgets/BootActiveForm.php

 	}
 
 	/**
-	 * Creates an input block of a specific type.
+	 * Creates an input row of a specific type.
 	 * @param string $type the input type
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $data the data for list inputs
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function inputBlock($type, $model, $attribute, $data = null, $htmlOptions = array())
+	public function inputRow($type, $model, $attribute, $data = null, $htmlOptions = array())
 	{
 		ob_start();
-		Yii::app()->controller->widget('ext.bootstrap.widgets.BootInputBlock',array(
+		Yii::app()->controller->widget('ext.bootstrap.widgets.BootInput',array(
 			'type'=>$type,
 			'form'=>$this,
 			'model'=>$model,
 	}
 
 	/**
-	 * Renders a checkbox input block.
+	 * Renders a checkbox input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function checkBoxBlock($model, $attribute, $htmlOptions = array())
+	public function checkBoxRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('checkbox', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('checkbox', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
-	 * Renders a checkbox list input block.
+	 * Renders a checkbox list input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $data the list data
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function checkBoxListBlock($model, $attribute, $data = array(), $htmlOptions = array())
+	public function checkBoxListRow($model, $attribute, $data = array(), $htmlOptions = array())
 	{
-		return $this->inputBlock('checkboxlist', $model, $attribute, $data, $htmlOptions);
+		return $this->inputRow('checkboxlist', $model, $attribute, $data, $htmlOptions);
 	}
 
 	/**
-	 * Renders a drop-down list input block.
+	 * Renders a drop-down list input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $data the list data
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function dropDownListBlock($model, $attribute, $data = array(), $htmlOptions = array())
+	public function dropDownListRow($model, $attribute, $data = array(), $htmlOptions = array())
 	{
-		return $this->inputBlock('dropdownlist', $model, $attribute, $data, $htmlOptions);
+		return $this->inputRow('dropdownlist', $model, $attribute, $data, $htmlOptions);
 	}
 
 	/**
-	 * Renders a file field input block.
+	 * Renders a file field input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function fileFieldBlock($model, $attribute, $htmlOptions = array())
+	public function fileFieldRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('filefield', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('filefield', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
-	 * Renders a password field input block.
+	 * Renders a password field input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function passwordFieldBlock($model, $attribute, $htmlOptions = array())
+	public function passwordFieldRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('password', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('password', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
-	 * Renders a radio button input block.
+	 * Renders a radio button input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function radioButtonBlock($model, $attribute, $htmlOptions = array())
+	public function radioButtonRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('radiobutton', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('radiobutton', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
-	 * Renders a radio button list input block.
+	 * Renders a radio button list input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $data the list data
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function radioButtonListBlock($model, $attribute, $data = array(), $htmlOptions = array())
+	public function radioButtonListRow($model, $attribute, $data = array(), $htmlOptions = array())
 	{
-		return $this->inputBlock('radiobuttonlist', $model, $attribute, $data, $htmlOptions);
+		return $this->inputRow('radiobuttonlist', $model, $attribute, $data, $htmlOptions);
 	}
 
 	/**
-	 * Renders a text field input block.
+	 * Renders a text field input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function textFieldBlock($model, $attribute, $htmlOptions = array())
+	public function textFieldRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('textfield', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('textfield', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
-	 * Renders a text area input block.
+	 * Renders a text area input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 */
-	public function textAreaBlock($model, $attribute, $htmlOptions = array())
+	public function textAreaRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('textarea', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('textarea', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
-	 * Renders a captcha block.
+	 * Renders a captcha row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 * @since 0.9.3
 	 */
-	public function captchaBlock($model, $attribute, $htmlOptions = array())
+	public function captchaRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('captcha', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('captcha', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
-	 * Renders an uneditable text field block.
+	 * Renders an uneditable text field row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute
 	 * @param array $htmlOptions additional HTML attributes
-	 * @return string the generated block
+	 * @return string the generated row
 	 * @since 0.9.5
 	 */
-	public function uneditableBlock($model, $attribute, $htmlOptions = array())
+	public function uneditableRow($model, $attribute, $htmlOptions = array())
 	{
-		return $this->inputBlock('uneditable', $model, $attribute, null, $htmlOptions);
+		return $this->inputRow('uneditable', $model, $attribute, null, $htmlOptions);
 	}
 
 	/**
 		CHtml::resolveNameID($model, $attribute, $htmlOptions);
 		$selection = CHtml::resolveValue($model, $attribute);
 
-		if($model->hasErrors($attribute))
+		if ($model->hasErrors($attribute))
 		{
 			if(isset($htmlOptions['class']))
 				$htmlOptions['class'] .= ' '.CHtml::$errorCss;
 		$name = $htmlOptions['name'];
 		unset($htmlOptions['name']);
 
-		if(array_key_exists('uncheckValue', $htmlOptions))
+		if (array_key_exists('uncheckValue', $htmlOptions))
 		{
 			$uncheck = $htmlOptions['uncheckValue'];
 			unset($htmlOptions['uncheckValue']);
 
 		if ($html === '')
 		{
-			if(isset($htmlOptions['style']))
+			if (isset($htmlOptions['style']))
 				$htmlOptions['style'] = rtrim($htmlOptions['style'], ';').';display:none';
 			else
 				$htmlOptions['style'] = 'display:none';

widgets/BootInput.php

+<?php
+/**
+ * BootInputBlock class file.
+ * @author Christoffer Niska <ChristofferNiska@gmail.com>
+ * @copyright Copyright &copy; Christoffer Niska 2011-
+ * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
+ */
+ 
+class BootInput extends CInputWidget
+{
+	/**
+	 * @property BootActiveForm the associated form widget.
+	 */
+	public $form;
+	/**
+	 * @property string the input label text.
+	 */
+	public $label;
+	/**
+	 * @property string the input type.
+	 * Following types are supported: checkbox, checkboxlist, dropdownlist, filefield, password,
+	 * radiobutton, radiobuttonlist, textarea, textfield, captcha and uneditable.
+	 */
+	public $type;
+	/**
+	 * @property array the data for list inputs.
+	 */
+	public $data = array();
+
+	/**
+	 * Initializes the widget.
+	 * This method is called by {@link CBaseController::createWidget}
+	 * and {@link CBaseController::beginWidget} after the widget's
+	 * properties have been initialized.
+	 */
+	public function init()
+	{
+		if ($this->form === null)
+			throw new CException(__CLASS__.': '.Yii::t('bootstrap','Failed to initialize widget! Form is not set.'));
+
+		if ($this->model === null)
+			throw new CException(__CLASS__.': '.Yii::t('bootstrap','Failed to initialize widget! Model is not set.'));
+
+		if ($this->type === null)
+			throw new CException(__CLASS__.': '.Yii::t('bootstrap','Failed to initialize widget! Input type is not set.'));
+	}
+
+	/**
+	 * Executes the widget.
+	 * This method is called by {@link CBaseController::endWidget}.
+	 */
+	public function run()
+	{
+		$errorCss = $this->model->hasErrors($this->attribute) ? ' '.CHtml::$errorCss : '';
+		echo CHtml::openTag('div', array('class'=>'clearfix'.$errorCss));
+
+		switch ($this->type)
+		{
+			case 'checkbox':
+				$this->checkBox();
+				break;
+
+			case 'checkboxlist':
+				$this->checkBoxList();
+				break;
+
+			case 'dropdownlist':
+				$this->dropDownList();
+				break;
+
+			case 'filefield':
+				$this->fileField();
+				break;
+
+			case 'password':
+				$this->passwordField();
+				break;
+
+			case 'radiobutton':
+				$this->radioButton();
+				break;
+
+			case 'radiobuttonlist':
+				$this->radioButtonList();
+				break;
+
+			case 'textarea':
+				$this->textArea();
+				break;
+
+			case 'textfield':
+				$this->textField();
+				break;
+
+			case 'captcha':
+				$this->captcha();
+				break;
+
+			case 'uneditable':
+				$this->uneditableField();
+				break;
+
+			default:
+				throw new CException(Yii::t('bootstrap',__CLASS__.': Failed to run widget! Input type is invalid.'));
+		}
+
+		echo '</div>';
+	}
+
+	protected function checkBox()
+	{
+		echo '<div class="input">';
+		echo '<label for="'.CHtml::getIdByName(CHtml::resolveName($this->model, $this->attribute)).'">';
+		echo $this->form->checkBox($this->model, $this->attribute, $this->htmlOptions).' ';
+		echo '<span>'.$this->model->getAttributeLabel($this->attribute).'</span>';
+		echo $this->getHint().$this->getError();
+		echo '</label></div>';
+	}
+
+	protected function checkBoxList()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo $this->form->checkBoxList($this->model, $this->attribute, $this->data, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	protected function dropDownList()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo $this->form->dropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	protected function fileField()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo $this->form->fileField($this->model, $this->attribute, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	protected function passwordField()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo $this->form->passwordField($this->model, $this->attribute, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	protected function radioButton()
+	{
+		echo '<div class="input">';
+		echo '<label for="'.CHtml::getIdByName(CHtml::resolveName($this->model, $this->attribute)).'">';
+		echo $this->form->radioButton($this->model, $this->attribute, $this->htmlOptions).' ';
+		echo '<span>'.$this->model->getAttributeLabel($this->attribute).'</span>';
+		echo $this->getHint().$this->getError();
+		echo '</label></div>';
+	}
+
+	protected function radioButtonList()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo $this->form->radioButtonList($this->model, $this->attribute, $this->data, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	protected function textArea()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo $this->form->textArea($this->model, $this->attribute, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	protected function textField()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	protected function captcha()
+	{
+		echo $this->getLabel().'<div class="input"><div class="captcha">';
+		echo '<div class="widget">'.$this->widget('CCaptcha', array(), true).'</div>';
+		echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
+		echo $this->getHint().$this->getError();
+		echo '</div></div>';
+	}
+
+	protected function uneditableField()
+	{
+		echo $this->getLabel().'<div class="input">';
+		echo '<span class="uneditable-input">'.$this->model->{$this->attribute}.'</span>';
+		echo $this->getHint().$this->getError();
+		echo '</div>';
+	}
+
+	/**
+	 * Returns the label for this block.
+	 * @return string the label
+	 */
+	protected function getLabel()
+	{
+		if ($this->label !== false && !in_array($this->type, array('checkbox', 'radio')) && $this->hasModel())
+			return $this->form->labelEx($this->model, $this->attribute);
+		else if ($this->label !== null)
+			return $this->label;
+		else
+			return '';
+	}
+
+	/**
+	 * Returns the hint text for this block.
+	 * @return string the hint text
+	 */
+	protected function getHint()
+	{
+		if (isset($this->htmlOptions['hint']))
+		{
+			$hint = $this->htmlOptions['hint'];
+			unset($this->htmlOptions['hint']);
+			return '<span class="help-block">'.$hint.'</span>';
+		}
+		else
+			return '';
+	}
+
+	/**
+	 * Returns the error text for this block.
+	 * @return string the error text
+	 */
+	protected function getError()
+	{
+		return $this->form->error($this->model, $this->attribute);
+	}
+}

widgets/BootInputBlock.php

-<?php
-/**
- * BootInputBlock class file.
- * @author Christoffer Niska <ChristofferNiska@gmail.com>
- * @copyright Copyright &copy; Christoffer Niska 2011-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- */
- 
-class BootInputBlock extends CInputWidget
-{
-	/**
-	 * @property BootActiveForm the associated form widget.
-	 */
-	public $form;
-	/**
-	 * @property string the input label text.
-	 */
-	public $label;
-	/**
-	 * @property string the input type.
-	 * Following types are supported: checkbox, checkboxlist, dropdownlist, filefield, password,
-	 * radiobutton, radiobuttonlist, textarea, textfield, captcha and uneditable.
-	 */
-	public $type;
-	/**
-	 * @property array the data for list inputs.
-	 */
-	public $data = array();
-
-	/**
-	 * Initializes the widget.
-	 * This method is called by {@link CBaseController::createWidget}
-	 * and {@link CBaseController::beginWidget} after the widget's
-	 * properties have been initialized.
-	 */
-	public function init()
-	{
-		if ($this->form === null)
-			throw new CException(__CLASS__.': '.Yii::t('bootstrap','Failed to initialize widget! Form is not set.'));
-
-		if ($this->model === null)
-			throw new CException(__CLASS__.': '.Yii::t('bootstrap','Failed to initialize widget! Model is not set.'));
-
-		if ($this->type === null)
-			throw new CException(__CLASS__.': '.Yii::t('bootstrap','Failed to initialize widget! Input type is not set.'));
-	}
-
-	/**
-	 * Executes the widget.
-	 * This method is called by {@link CBaseController::endWidget}.
-	 */
-	public function run()
-	{
-		$errorCss = $this->model->hasErrors($this->attribute) ? ' '.CHtml::$errorCss : '';
-		echo CHtml::openTag('div', array('class'=>'clearfix'.$errorCss));
-
-		switch ($this->type)
-		{
-			case 'checkbox':
-				$this->checkBox();
-				break;
-
-			case 'checkboxlist':
-				$this->checkBoxList();
-				break;
-
-			case 'dropdownlist':
-				$this->dropDownList();
-				break;
-
-			case 'filefield':
-				$this->fileField();
-				break;
-
-			case 'password':
-				$this->passwordField();
-				break;
-
-			case 'radiobutton':
-				$this->radioButton();
-				break;
-
-			case 'radiobuttonlist':
-				$this->radioButtonList();
-				break;
-
-			case 'textarea':
-				$this->textArea();
-				break;
-
-			case 'textfield':
-				$this->textField();
-				break;
-
-			case 'captcha':
-				$this->captcha();
-				break;
-
-			case 'uneditable':
-				$this->uneditableField();
-				break;
-
-			default:
-				throw new CException(Yii::t('bootstrap',__CLASS__.': Failed to run widget! Input type is invalid.'));
-		}
-
-		echo '</div>';
-	}
-
-	protected function checkBox()
-	{
-		echo '<div class="input">';
-		echo '<label for="'.CHtml::getIdByName(CHtml::resolveName($this->model, $this->attribute)).'">';
-		echo $this->form->checkBox($this->model, $this->attribute, $this->htmlOptions).' ';
-		echo '<span>'.$this->model->getAttributeLabel($this->attribute).'</span>';
-		echo $this->getHint().$this->getError();
-		echo '</label></div>';
-	}
-
-	protected function checkBoxList()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo $this->form->checkBoxList($this->model, $this->attribute, $this->data, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	protected function dropDownList()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo $this->form->dropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	protected function fileField()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo $this->form->fileField($this->model, $this->attribute, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	protected function passwordField()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo $this->form->passwordField($this->model, $this->attribute, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	protected function radioButton()
-	{
-		echo '<div class="input">';
-		echo '<label for="'.CHtml::getIdByName(CHtml::resolveName($this->model, $this->attribute)).'">';
-		echo $this->form->radioButton($this->model, $this->attribute, $this->htmlOptions).' ';
-		echo '<span>'.$this->model->getAttributeLabel($this->attribute).'</span>';
-		echo $this->getHint().$this->getError();
-		echo '</label></div>';
-	}
-
-	protected function radioButtonList()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo $this->form->radioButtonList($this->model, $this->attribute, $this->data, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	protected function textArea()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo $this->form->textArea($this->model, $this->attribute, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	protected function textField()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	protected function captcha()
-	{
-		echo $this->getLabel().'<div class="input"><div class="captcha">';
-		echo '<div class="widget">'.$this->widget('CCaptcha', array(), true).'</div>';
-		echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
-		echo $this->getHint().$this->getError();
-		echo '</div></div>';
-	}
-
-	protected function uneditableField()
-	{
-		echo $this->getLabel().'<div class="input">';
-		echo '<span class="uneditable-input">'.$this->model->{$this->attribute}.'</span>';
-		echo $this->getHint().$this->getError();
-		echo '</div>';
-	}
-
-	/**
-	 * Returns the label for this block.
-	 * @return string the label
-	 */
-	protected function getLabel()
-	{
-		if ($this->label !== false && !in_array($this->type, array('checkbox', 'radio')) && $this->hasModel())
-			return $this->form->labelEx($this->model, $this->attribute);
-		else if ($this->label !== null)
-			return $this->label;
-		else
-			return '';
-	}
-
-	/**
-	 * Returns the hint text for this block.
-	 * @return string the hint text
-	 */
-	protected function getHint()
-	{
-		if (isset($this->htmlOptions['hint']))
-		{
-			$hint = $this->htmlOptions['hint'];
-			unset($this->htmlOptions['hint']);
-			return '<span class="help-block">'.$hint.'</span>';
-		}
-		else
-			return '';
-	}
-
-	/**
-	 * Returns the error text for this block.
-	 * @return string the error text
-	 */
-	protected function getError()
-	{
-		return $this->form->error($this->model, $this->attribute);
-	}
-}