当前位置: 首页>>代码示例>>PHP>>正文


PHP Html::activePasswordInput方法代码示例

本文整理汇总了PHP中yii\helpers\Html::activePasswordInput方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::activePasswordInput方法的具体用法?PHP Html::activePasswordInput怎么用?PHP Html::activePasswordInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\helpers\Html的用法示例。


在下文中一共展示了Html::activePasswordInput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderHtml

 /**
  * @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);
 }
开发者ID:fengsmith1988,项目名称:qc-base,代码行数:13,代码来源:PasswordControl.php

示例2: renderInputField

 /**
  * 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;
     }
 }
开发者ID:bizley,项目名称:yii2-partial-password,代码行数:13,代码来源:PartialPassword.php

示例3:

        <div class="input-field col s12">
            <?php 
echo Html::activeTextInput($form, 'email', ['id' => 'email', 'name' => 'email', 'placeholder' => 'user@mail.ru']);
?>
            <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>
开发者ID:MEGApixel23,项目名称:finance-genius-web,代码行数:30,代码来源:sign-up.php

示例4:

                    <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;
开发者ID:CTaiDeng,项目名称:funshop,代码行数:31,代码来源:changePassword.php

示例5: passwordInput

 /**
  * 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;
 }
开发者ID:bmsrox,项目名称:yiicomm,代码行数:15,代码来源:ActiveField.php

示例6: run

 /**
  * {@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') . '&nbsp;<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]);
 }
开发者ID:hiqdev,项目名称:hipanel-core,代码行数:18,代码来源:PasswordInput.php

示例7: run

 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();
 }
开发者ID:ahb360,项目名称:cms,代码行数:18,代码来源:ShowPassword.php

示例8: passwordInput

 /**
  * 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;
 }
开发者ID:eesast,项目名称:ts17web,代码行数:26,代码来源:myActiveField.php

示例9:

<!--登录主体-->
<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']);
?>
开发者ID:James88,项目名称:www.yii2.com,代码行数:31,代码来源:login.php

示例10:

?>
</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">&nbsp;&nbsp;
                        <a id="change-password-save-btn"></a>
                    </td>
                </tr>
            </tbody>
        </table>
    <?php 
echo Html::endForm();
?>
</div>
开发者ID:sheillendra,项目名称:yii2-user,代码行数:31,代码来源:_account-setting-form.php

示例11:

}
?>

    <?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');
?>
开发者ID:guillemc,项目名称:yii2starter,代码行数:31,代码来源:login.php

示例12:

<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>
开发者ID:James88,项目名称:www.yii2.com,代码行数:30,代码来源:resetPassword.php

示例13:

?>
		<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>
开发者ID:xiewulong,项目名称:yii2-account,代码行数:30,代码来源:login.php

示例14: credentials

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 -->
    <? } ?>
开发者ID:radiata-cms,项目名称:radiata,代码行数:31,代码来源:lock-screen.php

示例15: passwordInput

 /**
  * 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;
 }
开发者ID:creators,项目名称:yii2-metroui,代码行数:16,代码来源:ActiveField.php


注:本文中的yii\helpers\Html::activePasswordInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。