Commit fb8c2544 by niskac

added support for addons with password fields (fixes #54)

parent 436defd3
......@@ -113,7 +113,9 @@ class BootInputHorizontal extends BootInput
{
echo $this->getLabel();
echo '<div class="controls">';
echo $this->getPrepend();
echo $this->form->passwordField($this->model, $this->attribute, $this->htmlOptions);
echo $this->getAppend();
echo $this->getError().$this->getHint();
echo '</div>';
}
......
......@@ -21,10 +21,11 @@ class BootInputSearch extends BootInputInline
*/
protected function textField()
{
$classes = 'search-query';
if (isset($this->htmlOptions['class']))
$this->htmlOptions['class'] .= ' search-query';
$this->htmlOptions['class'] .= ' '.$classes;
else
$this->htmlOptions['class'] = 'search-query';
$this->htmlOptions['class'] = $classes;
$this->htmlOptions['placeholder'] = $this->model->getAttributeLabel($this->attribute);
echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
......
......@@ -92,7 +92,9 @@ class BootInputVertical extends BootInput
protected function passwordField()
{
echo $this->getLabel();
echo $this->getPrepend();
echo $this->form->passwordField($this->model, $this->attribute, $this->htmlOptions);
echo $this->getAppend();
echo $this->getError().$this->getHint();
}
......
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