42 $this->htmlOptions[
'type'] =
'text';
43 $this->htmlOptions[
'autocomplete'] =
'off';
45 if (!isset($this->options[
'language'])) {
46 $this->options[
'locale'] = substr(Yii::app()->getLanguage(), 0, 2);
48 $this->options[
'locale'] = $this->options[
'language'];
60 list($name, $id) = $this->resolveNameID();
62 if ($this->hasModel()) {
64 echo $this->form->passwordField($this->model, $this->attribute, $this->htmlOptions);
66 echo CHtml::activePasswordField($this->model, $this->attribute, $this->htmlOptions);
70 echo CHtml::passwordField($name, $this->
value, $this->htmlOptions);
74 $options = !empty($this->options) ? CJavaScript::encode($this->options) :
'';
77 echo
"jQuery('#{$id}').passField({$options})";
78 foreach ($this->events as $event => $handler) {
79 echo
".on('{$event}', " . CJavaScript::encode($handler) .
")";
82 Yii::app()->getClientScript()->registerScript(__CLASS__ .
'#' . $this->getId(), ob_get_clean() .
';');