public function run() { echo ' <div class="input-group input-medium show-password">'; if ($this->hasModel()) { echo Html::activePasswordInput($this->model, $this->attribute, $this->options); } else { echo Html::passwordInput($this->name, $this->value, $this->options); } echo ' <span class="input-group-btn"> <button class="btn btn-default" style="margin-bottom: 5px; height: 34px;" type="button"> <i class="glyphicon glyphicon-eye-open"></i> </button> </span> </div>'; $this->registerClientScript(); }
<div class="wrapper"> <div class="login-body"> <div class="login-body-bd"> <div class="login-body-bd-tit">修改密码</div> <div class="gai-password"> <?php $form = ActiveForm::begin(['id' => 'reset-password-form']); ?> <div class="gai-password-ymm margin-bottom33"> 新密码: <?php echo Html::activePasswordInput($model, 'password', ['autofocus' => true, 'class' => 'ymm-txt', 'placeholder' => '请输入新密码']); ?> </div> <div class="gai-password-zcsr margin-bottom33"> 再次输入: <?php echo Html::activePasswordInput($model, 'repassword', ['class' => 'ymm-txt', 'placeholder' => '重复新密码']); ?> </div> <div class="gai-password-zcsr-xgmm"> <input type="submit" value="修改密码"> </div> <?php ActiveForm::end(); ?> </div> </div> </div> </div>
/** * @inheritdoc */ public function renderHtml() { if ($this->form !== null && $this->model !== null) { return $this->form->field($this->model, $this->attribute)->hint($this->hint)->passwordInput($this->htmlOptions); } if ($this->model !== null) { return Html::activePasswordInput($this->model, $this->attribute, $this->htmlOptions); } return Html::input('password', $this->name, $this->value, $this->htmlOptions); }
/** * Renders single input or blank field. * @param integer $bit whether it is input field (1) or blank field (0). * @return string */ public function renderInputField($bit) { if ($bit) { return Html::activePasswordInput($this->model, $this->attribute . '[]', $this->allInputOptions()); } else { return !empty($this->template['empty_field']) ? $this->template['empty_field'] : null; } }
<li> <label>当前密码:</label> <?php echo Html::activePasswordInput($model, 'oldpassword', ['class' => 'txt']); ?> </li> <li> <label>新密码:</label> <?php echo Html::activePasswordInput($model, 'password', ['class' => 'txt']); ?> </li> <li> <label>确认密码:</label> <?php echo Html::activePasswordInput($model, 'repassword', ['class' => 'txt']); ?> </li> <li> <?php echo Yii::$app->getSession()->getFlash('success'); echo Html::error($model, 'oldpassword'); echo Html::error($model, 'password'); echo Html::error($model, 'repassword'); ?> </li> <li class="last"><?php echo Html::submitButton(Yii::t('app', 'Submit'), ['class' => 'btn']); ?> <a href="<?php echo Yii::$app->request->referrer;
<div class="input-field col s12"> <?php echo Html::activeTextInput($form, 'email', ['id' => 'email', 'name' => 'email', 'placeholder' => '*****@*****.**']); ?> <label for="email"><?php echo $form->getAttributeLabel('email'); ?> </label> <div class="errors" data-for="email"></div> </div> </div> <div class="row"> <div class="input-field col s12"> <?php echo Html::activePasswordInput($form, 'password', ['id' => 'password', 'name' => 'password']); ?> <label for="password"><?php echo $form->getAttributeLabel('password'); ?> </label> <div class="errors" data-for="password"></div> </div> </div> <div class="row"> <div class="col s12"> <button class="btn waves-effect waves-light col s12" type="submit" name="action">Signup</button> </div> </div>
/** * Renders a password input. * This method will generate the "name" and "value" tag attributes automatically for the model attribute * unless they are explicitly specified in `$options`. * @param array $options the tag options in terms of name-value pairs. These will be rendered as * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * @return static the field object itself */ public function passwordInput($options = []) { $options = array_merge($this->inputOptions, $options); $this->adjustLabelFor($options); $this->parts['{input}'] = Html::activePasswordInput($this->model, $this->attribute, $options); return $this; }
/** * {@inheritdoc} */ public function run() { $this->registerClientScript(); $html = Html::activePasswordInput($this->model, $this->attribute, $this->inputOptions); $html .= '<div class="input-group-btn">'; $html .= Html::button(Html::tag('span', '', ['class' => 'glyphicon glyphicon-eye-open']), ['class' => 'btn btn-default show-password' . ($this->inputOptions['disabled'] ? ' disabled' : ''), 'tabindex' => '-1']); if ($this->randomGenerator) { $html .= Html::button(Yii::t('hipanel', 'Random') . ' <span class="caret"></span>', ['class' => 'btn btn-default dropdown-toggle' . ($this->inputOptions['disabled'] ? ' disabled' : ''), 'data-toggle' => 'dropdown', 'aria-expanded' => 'false', 'tabindex' => '-1']); $html .= Html::ul($this->randomOptions, ['class' => 'dropdown-menu', 'role' => 'menu', 'item' => function ($item) { return Html::tag('li', Html::a($item['label'], '#', ['data' => ['length' => $item['length'], 'specialchars' => $item['specialchars']], 'class' => 'random-passgen'])); }]); } $html .= '</div>'; echo Html::tag('div', $html, ['class' => 'input-group', 'id' => $this->id]); }
<!--登录主体--> <div class="wrapper"> <div class="login-body"> <div class="login-body-bd"> <div class="login-body-bd-tit">用户登录</div> <?php $form = ActiveForm::begin(['id' => 'login-form']); ?> <div class="login-zh">账号: <?php echo Html::activeTextInput($model, 'username', ['class' => 'user-text', 'placeholder' => '请输入用户名或邮箱']); ?> </div> <div class="login-mm">密码: <?php echo Html::activePasswordInput($model, 'password', ['class' => 'password-text', 'placeholder' => '请输入密码']); ?> </div> <div class="yzm">验证码: <?php echo Html::activeTextInput($model, 'captcha', ['class' => 'yzm-text', 'placeholder' => '请输入验证码']); ?> <span class="yzm-pic"> <?php echo Captcha::widget(['name' => 'captcha', 'template' => '{image}']); ?> </span> </div> <?php echo Html::errorSummary($model, ['class' => 'regerror error-tips']); ?>
/** * Renders a password input. * This method will generate the "name" and "value" tag attributes automatically for the model attribute * unless they are explicitly specified in `$options`. * @param array $options the tag options in terms of name-value pairs. These will be rendered as * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * * If you set a custom `id` for the input element, you may need to adjust the [[$selectors]] accordingly. * * @return $this the field object itself */ public function passwordInput($options = []) { $error = $this->model->getFirstError($this->attribute); if ($error) { $this->placeholder = $error; $this->model[$this->attribute] = ''; } $options = array_merge($this->inputOptions, $options, ['placeholder' => $this->placeholder, 'class' => 'am-form-field']); $this->adjustLabelFor($options); $this->parts['{input}'] = Html::activePasswordInput($this->model, $this->attribute, $options); if ($error) { $this->parts['{input}'] .= "<span class='am-icon-times'></span>"; } return $this; }
?> </td> <td>:</td> <td><?php echo Html::activePasswordInput($changePasswordForm, 'newPassword'); ?> </td> </tr> <tr> <td><?php echo Html::activeLabel($changePasswordForm, 'retypeNewPassword'); ?> </td> <td>:</td> <td><?php echo Html::activePasswordInput($changePasswordForm, 'retypeNewPassword'); ?> </td> </tr> <tr> <td></td> <td colspan="3"> <a id="change-password-save-btn"></a> </td> </tr> </tbody> </table> <?php echo Html::endForm(); ?> </div>
} ?> <?php $form = ActiveForm::begin(['options' => ['id' => 'login-form'], 'fieldConfig' => ['template' => "{label}\n{input}", 'labelOptions' => ['class' => 'control-label']]]); ?> <div class="form-group has-feedback"> <?php echo Html::activeTextInput($model, 'username', ['class' => 'form-control', 'autocomplete' => 'off', 'autofocus' => 'autofocus', 'placeholder' => $model->getAttributeLabel('username')]); ?> <span class="glyphicon glyphicon-user form-control-feedback"></span> </div> <div class="form-group has-feedback"> <?php echo Html::activePasswordInput($model, 'password', ['class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => $model->getAttributeLabel('password')]); ?> <span class="glyphicon glyphicon-lock form-control-feedback"></span> </div> <div class="row"> <div class="col-xs-8"> <div class="checkbox"> <?php echo Html::activeCheckbox($model, 'rememberMe'); ?> </div> </div><!-- /.col --> <div class="col-xs-4"> <button type="submit" class="btn btn-primary btn-block btn-flat"><?php echo Yii::t('admin', 'Log in'); ?>
?> <h1 class="text-center"><?php echo Html::encode($this->title); ?> </h1> <div class="form-group"> <?php echo Html::activeTextInput($user, 'username', ['class' => 'form-control', 'placeholder' => $user->getAttributeHint('username'), 'autofocus' => $user->isFirstErrorAttribute('username') || !$user->hasErrors()]); ?> <?php echo Html::label(null, Html::getInputId($user, 'username'), ['class' => 'glyphicon glyphicon-user']); ?> </div> <div class="form-group"> <?php echo Html::activePasswordInput($user, 'password', ['class' => 'form-control', 'placeholder' => $user->getAttributeHint('password'), 'autofocus' => $user->isFirstErrorAttribute('password')]); ?> <?php echo Html::label(null, Html::getInputId($user, 'password'), ['class' => 'glyphicon glyphicon-lock']); ?> </div> <div class="form-group"> <?php echo Html::submitButton(\Yii::t('account', 'login'), ['class' => 'btn btn-primary btn-lg btn-block']); ?> </div> <?php echo Html::endForm(); ?> </div>
echo Html::activeTextInput($model, 'username', ['class' => 'form-control input-lg', 'placeholder' => 'Username or Email']); //Field ?> <?php echo Html::error($model, 'username', ['class' => 'help-block']); //error echo $form->field($model, 'username')->end(); ?> <?php echo $form->field($model, 'ud_password')->begin(); //echo Html::activeLabel($model,'password'); //label ?> <label>Password:<span class="color-red">*</span></label> <?php echo Html::activePasswordInput($model, 'ud_password', ['class' => 'form-control input-lg', 'placeholder' => 'Password']); //Field ?> <?php echo Html::error($model, 'ud_password', ['class' => 'help-block']); //error echo $form->field($model, 'ud_password')->end(); ?> <div class="checkbox"> <label> <?php echo Html::activeCheckbox($model, 'rememberMe'); //Field ?>
<div class="registration-form-center"> <div class="registration-form-row"> <div><label for="" style="width: 100%; text-align: center; display: block;">Изменение пароля</label></div> </div><!-- end row --> <div class="registration-form-row"> <div><label for="">Пароль</label></div> <div><?php echo Html::activePasswordInput($user_pass, 'password', ['class' => $user->getError('password')]); ?> </div> </div><!-- end row --> <div class="registration-form-row"> <div><label for="">Подтверждение пароля</label></div> <div><?php echo Html::activePasswordInput($user_pass, 'password_repeat', ['class' => $user->getError('password_repeat')]); ?> </div> </div><!-- end row --> <div class="registration-form-row"> <div></div> <div><input class="btn-disabled" type="submit" value="Изменить" name="editPassword"></div> </div><!-- end row --> <div class="registration-form-row"> <div></div> <div> <?php if (count($user_pass->errors) > 0) { ?> <div class="error-wrap"> <?php
echo Html::img($user->getThumbFileUrl('image', 'avatar')); ?> </div> <!-- /.lockscreen-image --> <!-- lockscreen credentials (contains the form) --> <?php $form = ActiveForm::begin(['options' => ['data-pjax' => true, 'class' => 'lockscreen-credentials', 'autocomplete' => 'off']]); ?> <div class="input-group"> <?php echo Html::activeHiddenInput($model, 'user_id', ['value' => $user->id]); ?> <?php echo Html::activePasswordInput($model, 'user_password', ['class' => 'form-control', 'placeholder' => 'password', 'autocomplete' => 'off']); ?> <div class="input-group-btn"> <?php echo Html::submitButton('<i class="fa fa-arrow-right text-muted"></i>', ['class' => 'btn']); ?> </div> </div> <?php ActiveForm::end(); ?> <!-- /.lockscreen credentials --> </div> <!-- /.lockscreen-item --> <? } ?>
/** * Renders a password input. * This method will generate the "name" and "value" tag attributes automatically for the model attribute * unless they are explicitly specified in `$options`. * @param array $options the tag options in terms of name-value pairs. These will be rendered as * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * @return static the field object itself */ public function passwordInput($options = []) { $options = array_merge($this->inputOptions, $options); $this->adjustLabelFor($options); $this->parts['{input}'] = Html::activePasswordInput($this->model, $this->attribute, $options); $this->options['class'] = str_replace('text', 'password', $this->options['class']); return $this; }
?> <?php echo Html::error($model, 'username', ['class' => 'help-block help-block-error']); ?> <?php echo $form->field($model, 'username')->end(); ?> <?php echo $form->field($model, 'password')->begin(); ?> <?php echo Html::activeLabel($model, 'password', ['label' => Yii::t('app', 'Пароль')]); ?> <?php echo Html::activePasswordInput($model, 'password', ['class' => 'form-control']); ?> <?php echo Html::error($model, 'password', ['class' => 'help-block help-block-error']); ?> <?php echo $form->field($model, 'password')->end(); ?> <?php echo $form->field($model, 'rememberMe')->begin(); ?> <div class="checkbox"> <?php echo Html::activeCheckbox($model, 'rememberMe', ['label' => Yii::t('app', 'Запомнить меня?')]);
<b style="color: red;">*</b> <?php } ?> </td> </tr> <?php } ?> <tr valign="middle" align="left" height="60"> <td align="right"> <b>ПАРОЛЬ</b>: </td> <td> <?php echo Html::activePasswordInput($model, 'password', ['class' => 'form-item req std-input']); ?> <?php if (isset($error["password"])) { ?> <b style="color: red;">*</b> <?php } ?> </td> </tr> </table> </div> <div class="col-xs-0 col-sm-1 col-md-1 col-lg-1"></div> </div> <div style="height:20px;"></div>
?> </div> <?php echo $form->field($model, 'email')->end(); ?> <?php echo $form->field($model, 'password')->begin(); ?> <?php echo Html::activeLabel($model, 'password', ['label' => Yii::t('app', 'Пароль:'), 'class' => 'control-label col-xs-6']); ?> <div class="col-xs-6"> <?php echo Html::activePasswordInput($model, 'password', ['id' => 'password', 'class' => 'form-control ', 'size' => '7']); ?> </div> <?php echo $form->field($model, 'password')->end(); ?> <?php echo $form->field($model, 'default_currency')->begin(); ?> <?php echo Html::activeLabel($model, 'default_currency', ['label' => Yii::t('app', 'Валюта по умолчанию:'), 'class' => 'control-label col-xs-6']); ?> <div class="col-xs-6"> <?php
<p><?php echo Yii::t('app', 'Пожалуйста, введите ваш новый пароль:'); ?> </p> <div class="row"> <div class="col-lg-12"> <?php $form = ActiveForm::begin(['id' => 'reset-password-form']); ?> <?php echo $form->field($model, 'password')->begin(); ?> <?php echo Html::activePasswordInput($model, 'password', ['label' => Yii::t('app', 'Пароль')]); ?> <?php echo $form->field($model, 'password')->end(); ?> <div class="form-group"> <?php echo Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div> </div>
?> </td> <td>:</td> <td><?php echo Html::activeTextInput($model, 'username'); ?> </td> </tr> <tr> <td><?php echo Html::activeLabel($model, 'password'); ?> </td> <td>:</td> <td><?php echo Html::activePasswordInput($model, 'password'); ?> </td> </tr> <tr> <td></td> <td></td> <td><?php echo Html::activeCheckbox($model, 'rememberMe'); ?> </td> </tr> <tr> <td colspan="3"> <a id="login-forgot-btn" href="javascript:void(0);">Forgot Password</a>, or <a id="login-signup-btn" href="javascript:void(0);">SignUp</a></td>
<div> <label for="">логин</label> </div> <div> <?php echo Html::activeTextInput($loginForm, 'username'); ?> </div> </div> <div class="form-authorization-row"> <div> <label for="">пароль</label> </div> <div> <?php echo Html::activePasswordInput($loginForm, 'password'); ?> </div> </div> <div class="form-authorization-row"> <div> </div> <div> <input type="submit" value="Вход" name="auth" id="btnAuth"> </div> </div> <div class="form-authorization-row"> <div> </div>
} ?> <label for="username" class="help-inline help-small no-left-padding <?php echo $user_class; ?> "><?php echo $user_info; ?> </label> </div> <div class="control-group error"> <label class="block clearfix"> <span class="block input-icon input-icon-left"> <?php echo Html::activePasswordInput($model, 'password', ['placeholder' => 'Password', 'class' => 'form-control']); ?> <i class="ace-icon fa fa-lock"></i> </span> </label> <?php $pass_class = 'hidden'; $pass_info = ''; if (isset($errorArr['password'])) { $pass_class = ''; $pass_info = $errorArr['password'][0]; } ?> <label for="password" class="help-inline help-small no-left-padding <?php echo $pass_class; ?>
?> <div> <?php echo Html::activePasswordInput($model, 'password', ['class' => 'form-control', 'ng-model' => 'model.password']); ?> <error field="password"></error> </div> </div> <div class="form-group required"> <?php echo Html::activeLabel($model, 'verifyPassword', ['class' => 'control-label']); ?> <div> <?php echo Html::activePasswordInput($model, 'verifyPassword', ['class' => 'form-control', 'ng-model' => 'model.verifyPassword']); ?> <error field="verifyPassword"></error> </div> </div> <div class="form-group"> <?php echo Html::submitButton(Module::t('registration', 'USER_BUTTON_REGISTRATION'), ['class' => 'btn btn-primary', 'ladda' => 'loading', 'ng-click' => 'registration()']); ?> </div> <?php echo Html::endForm(); ?> </div> </div>
<?php echo Html::activePasswordInput($signupStep1, 'password', ['class' => 'form-control', 'placeholder' => 'password']); ?> <div class="text-danger"><?php echo Html::error($signupStep1, 'password', ['class' => 'error']); ?> </div> <div class="result"><div class="text btn btn-md"></div></div> </div> <div class="form-group" id="step1-registration-confirmpassword"> <?php echo Html::activeLabel($signupStep1, 'confirmpassword'); ?> <?php echo Html::activePasswordInput($signupStep1, 'confirmpassword', ['class' => 'form-control', 'placeholder' => 'confirm password']); ?> <div class="text-danger"><?php echo Html::error($signupStep1, 'confirmpassword', ['class' => 'error']); ?> </div> <div class="result"><div class="text btn btn-md"></div></div> </div> <label id="progress-pwd-label">Password Strenght</label> <div class="progress"> <div id="progress-weakpw" class="progress-bar progress-bar-danger progress-bar-striped active" role="progressbar" style="width: 0%"> <span class="sr-only">25% Complete (danger)</span> </div> <div id="progress-goodpw" class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" style="width: 0%"> <span class="sr-only">33% Complete (warning)</span> </div>
<div id="da-login-box-header"> <h1>Login</h1> </div> <div id="da-login-box-content"> <?php $form = ActiveForm::begin(['id' => 'da-login-form']); ?> <div id="da-login-input-wrapper"> <div class="da-login-input"> <?php echo Html::activeTextInput($model, 'username', ['id' => 'da-login-username', 'placeholder' => 'Username']); ?> </div> <div class="da-login-input"> <?php echo Html::activePasswordInput($model, 'password', ['id' => 'da-login-password', 'placeholder' => 'Password']); ?> </div> </div> <div id="da-login-button"> <input type="submit" value="Login" id="da-login-submit" /> </div> <?php ActiveForm::end(); ?> </div> <div id="da-login-box-footer"> <?php if (!empty($message)) { echo $message . '<br>'; }
?> </td> <td>:</td> <td><?php echo Html::activeTextInput($signupForm, 'email'); ?> </td> </tr> <tr> <td width="80px"><?php echo Html::activeLabel($signupForm, 'password'); ?> </td> <td>:</td> <td><?php echo Html::activePasswordInput($signupForm, 'password'); ?> </td> </tr> <tr> <td width="80px"><?php echo Html::label('Role'); ?> </td> <td>:</td> <td><?php echo Html::dropDownList('role', '', [], ['id' => 'signupform-role']); ?> </td> </tr> </tbody>