Exemple #1
0
 public static function password($name, $value = NULL, array $attributes = NULL)
 {
     if (!isset($attributes['id']) and self::$auto_id) {
         $attributes['id'] = 'field-' . $name;
     }
     return parent::password($name, $value, $attributes) . PHP_EOL;
 }
Exemple #2
0
 /**
  * Creates a password form input.
  *
  * @param   string  input name
  * @param   string  input value
  * @param   array   html attributes
  * @return  string
  */
 public function password($name, $value = NULL, array $attributes = NULL)
 {
     $attributes = Appform::add_class($attributes, 'password');
     $attributes['id'] = $name;
     $this->load_values($name, $value, $attributes);
     return Kohana_Form::password($name, $value, $attributes) . $this->addAlertSpan(isset($this->errors[$name]) ? $this->errors[$name] : NULL, $attributes);
 }
 /**
  * Creates a password form input.
  *
  * @param   string  input name
  * @param   string  input value
  * @param   array   html attributes
  * @return  string
  */
 public function password($name, $value = NULL, array $attributes = NULL)
 {
     $attributes = Appform::add_class($attributes, 'password');
     $this->load_values($name, $value, $attributes);
     $result = '<li>' . Kohana_Form::password($name, $value, $attributes);
     // add error span
     if (isset($this->errors[$name])) {
         $result .= '<span class="error">' . ucfirst($this->errors[$name]) . '</span>';
     } else {
         if (isset($attributes['info'])) {
             // else add info span
             $result .= '<span class="' . $this->info_class . '">' . $attributes['info'] . '</span>';
         }
     }
     $result .= '</li>';
     return $result;
 }