本文整理汇总了PHP中yii\helpers\Html::passwordInput方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::passwordInput方法的具体用法?PHP Html::passwordInput怎么用?PHP Html::passwordInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\helpers\Html
的用法示例。
在下文中一共展示了Html::passwordInput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderWidget
/**
* @return string
* @throws InvalidConfigException
*/
private function renderWidget($input = '')
{
$imgSrc = "data:image/jpeg;base64,";
if ($this->QrParams['type'] === Enum::QR_FORMAT_PNG) {
$imgSrc = "data:image/png;base64,";
}
echo '<div><img src=' . $imgSrc . base64_encode($this->generateQr($this->otp->getProvisioningUri())) . ' /></div>';
if ($this->link || is_string($this->link)) {
echo Html::a($this->link, $this->otp->getProvisioningUri());
}
echo $this->hasModel() ? Html::activeHiddenInput($this->model, $this->attribute, $this->options) : Html::passwordInput($this->name, $this->value, $this->options);
}
示例2: run
/**
* @inheritdoc
*/
public function run()
{
Asset::register($this->view);
$config = empty($this->config) ? json_encode(['locale' => \Yii::$app->language]) : json_encode($this->config);
$this->view->registerJs(sprintf('$("#%s").passField(%s)', $this->options['id'], $config));
if ($this->hasModel()) {
if ($this->form == null) {
throw new InvalidConfigException(__CLASS__ . '.form property must be specified');
}
return $this->form->field($this->model, $this->attribute)->passwordInput($this->options);
} else {
return Html::passwordInput($this->name, $this->value, $this->options);
}
}
示例3: 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();
}
示例4: value
private function value($value, $type = null, $options = [])
{
$uniqid = uniqid();
$options = array_merge(['role' => 'statusInfoValue', 'id' => 'status-info-span' . $uniqid, 'class' => 'col-md-7 col-lg-7'], $options);
switch ($type) {
case 'link':
$value = Html::a($value, $value);
break;
case 'input':
$value = Html::textInput('status-info-input' . $uniqid, $value, ['id' => 'status-info-input' . $uniqid, 'class' => 'form-control']);
break;
case 'password':
$value = Html::passwordInput('status-info-input' . $uniqid, $value, ['id' => 'status-info-input' . $uniqid, 'class' => 'form-control']);
break;
case 'raw':
case 'text':
break;
default:
$options['class'] = ' badge';
break;
}
return Html::tag('span', $value, $options);
}
示例5: passwordInput
/**
* @inheritdoc
*/
public function passwordInput($options = [])
{
$options = $this->mergeInputOptions(['class' => 'k-textbox'], $options);
$this->parts['{input}'] = Html::passwordInput($this->attribute, null, $options);
return $this;
}
示例6: passwordInput
/**
* Passwword input field
*
* @param array $options Optional data for the text input array.
* @return \luya\admin\ngrest\aw\ActiveField
*/
public function passwordInput(array $options = [])
{
$this->parts['{input}'] = Html::passwordInput($this->attribute, $this->value, ['class' => 'input__field', 'id' => $this->form->getFieldId($this->attribute), 'ng-model' => 'params.' . $this->attribute]);
$this->parts['{class}'] = 'input input--text input--vertical';
return $this;
}
示例7: passwordForm
public static function passwordForm($model, $value = null, $isBackForm = true, $appendOptions = [])
{
$value = self::getValue($model, $value, $isBackForm);
$options = self::getOptions($model, $isBackForm, $appendOptions);
return Html::passwordInput(self::getInputName($model, $options), $value, $options);
}
示例8:
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Password:</label>
<div class="col-md-9">
<?php
echo Html::passwordInput('password', '', ['id' => 'password', 'class' => 'form-control', 'placeholder' => 'กรุณากรอกรหัสผ่านใหม่']);
?>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Verify Password:</label>
<div class="col-md-9">
<?php
echo Html::passwordInput('confirmPassword', '', ['id' => 'confirmPassword', 'class' => 'form-control', 'placeholder' => 'กรุณากรอกรหัสผ่านใหม่อีกครั้ง']);
?>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3"></label>
<div class="col-md-9">
<p class="ect"></p>
</div>
</div>
</div>
</div>
</div>
示例9: array
?>
</div>
<div class="form-group">
<?php
echo Html::label('Пользователь');
?>
<?php
echo Html::TextInput('db_user', $settings['db_user'], array('class' => 'form-control'));
?>
</div>
<div class="form-group">
<?php
echo Html::label('Пароль');
?>
<?php
echo Html::passwordInput('db_password', $settings['db_password'], array('class' => 'form-control'));
?>
</div>
<div class="form-group text-right">
<?php
echo Html::button('Проверка', ['class' => 'btn btn-warning pull-left check', 'name' => 'db-check']);
?>
<?php
echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary', 'name' => 'db-button']);
?>
</div>
<div id="result" class="form-group"></div>
<?php
ActiveForm::end();
?>
</div>
示例10:
?>
<div class="post-protected">
<?php
$form = ActiveForm::begin();
?>
<p><?php
echo Yii::t('writesdown', 'The media is protected, therefore, please type the right password to view the media.');
?>
</p>
<div class="form-group field-posttype-post_type_name required">
<?php
echo Html::label(Yii::t('writesdown', 'Password'), 'post-post_password', ['class' => 'control-label']);
?>
<?php
echo Html::passwordInput('password', null, ['class' => 'form-control', 'id' => 'post-post_password']);
?>
</div>
<div class="form-group">
<?php
echo Html::submitButton(Yii::t('writesdown', 'Submit The Password'), ['class' => 'btn btn-flat btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例11: getApixPasswordHtml
protected function getApixPasswordHtml($form, $config, $field)
{
$model = $config['model'];
$fieldHtml = Html::passwordInput($model . "[{$field->name}]", null, $field->options);
if ($config['label']) {
$fieldHtml = "<div class='frm-field'><label>{$field->label}</label>{$fieldHtml}<span class='error' cmt-error='{$field->name}'></span></div>";
} else {
$fieldHtml = "<div class='frm-field'>{$fieldHtml}<span class='error' cmt-error='{$field->name}'></span></div>";
}
return $fieldHtml;
}
示例12:
<?php
$form = ActiveForm::begin(['id' => 'user-form', 'layout' => 'horizontal']);
echo $form->errorSummary($model);
echo $form->field($model, 'email')->input('email');
echo $form->field($model, 'password')->input('password');
?>
<div class="form-group field-user-password_confirm">
<label class="control-label col-sm-3" for="password_confirm"><?php
echo Yii::t('ica_auth', 'Confirm password');
?>
</label>
<div class="col-sm-6">
<?php
echo Html::passwordInput('password_confirm', null, ['class' => 'form-control']);
?>
</div>
</div>
<?php
echo $form->field($model, 'is_active')->checkbox();
?>
<div class="form-group field-auth_items">
<label class="control-label col-sm-3"><?php
echo Yii::t('ica_auth', 'Roles');
?>
</label>
<?php
$allAuthItems = [];
示例13:
ActiveForm::begin();
?>
<div class="form-group">
<?php
echo Html::label('Username', 'username');
?>
<?php
echo Html::textInput('username', '', ['class' => 'form-control']);
?>
</div>
<div class="form-group">
<?php
echo Html::label('Password', 'password');
?>
<?php
echo Html::passwordInput('password', '', ['class' => 'form-control']);
?>
</div>
<?php
echo Html::submitButton('Login', ['class' => 'btn btn-primary']);
?>
<?php
ActiveForm::end();
?>
<?php
} else {
?>
<h2>You are authenticated!</h2>
<br /><br />
<?php
echo Html::a('Logout', ['my-authentication/logout'], ['class' => 'btn btn-warning']);
示例14: array
?>
" width="754" height="537"></a></div>
</div>
</div>
</div>
<!-- 滚动图片 -->
</div>
<div class="urlog">
<h3>用户登录</h3>
<form class="frla" action="/site/login" method="post">
<?php
echo Html::textInput("LoginForm[username]", $model->username, array('id' => 'username', 'placeholder' => '用户名', 'class' => 'txt'));
?>
<?php
echo Html::passwordInput('LoginForm[password]', $model->password, array('id' => 'password', 'placeholder' => '密码', 'class' => 'pass'));
?>
<?php
echo Html::textInput('LoginForm[verifycode]', '', array('id' => 'verifycode', 'placeholder' => '请输入右侧验证码', 'class' => 'tchec'));
?>
<div class="checo verify-code" style="top:156px">
<?php
$url = '/site/captcha';
echo "<a href='javascript:' onclick='javascript:return refreshcode();' >" . Html::img($url, array('id' => 'img_code', 'style' => 'height:35px;')) . "</a>";
?>
</div>
<div class="error">
<?php
$errors = $model->getFirstErrors();
if (count($errors) > 0) {
示例15: foreach
}
?>
</div>
<?php
}
?>
</div>
<div class="form-group field-loginform-password required
<?php
echo $model->getErrors('password') ? ' has-error' : '';
?>
">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-key"></i></span>
<?php
echo Html::passwordInput('LoginForm[password]', $model->password, ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('password')]);
?>
</div>
<?php
if ($model->getErrors('password')) {
?>
<div class="help-block">
<?php
foreach ($model->getErrors('password') as $error) {
?>
<p>
<?php
echo $error;
?>
</p>
<?php