/**
  * @inheritdoc
  */
 public function init()
 {
     /**
      * @var Module $m
      */
     $m = Yii::$app->getModule('user');
     if (!$m->getRegistrationSetting('randomUsernames', $this->userType)) {
         $this->attributes['username'] = ['type' => Form::INPUT_TEXT, 'options' => ['autocomplete' => 'new-username']];
     }
     if (!$m->getRegistrationSetting('randomPasswords', $this->userType)) {
         $password = ['type' => Form::INPUT_PASSWORD];
         if (in_array(Module::SCN_REGISTER, $m->passwordSettings['strengthMeter'])) {
             $password = ['type' => Form::INPUT_WIDGET, 'widgetClass' => PasswordInput::classname(), 'options' => ['options' => ['placeholder' => Yii::t('user', 'Password'), 'autocomplete' => 'off']]];
         }
         $this->attributes['password'] = $password;
     }
     $this->attributes['email'] = ['type' => Form::INPUT_TEXT];
     $captcha = ArrayHelper::getValue($m->registrationSettings, 'captcha', false);
     if ($captcha !== false && is_array($captcha)) {
         $this->attributes['captcha'] = ['type' => Form::INPUT_WIDGET, 'widgetClass' => Captcha::classname(), 'options' => $captcha['widget']];
     }
     parent::init();
     unset($this->attributes['rememberMe']);
     $this->leftFooter = $m->button(Module::BTN_HOME) . $m->button(Module::BTN_ALREADY_REGISTERED);
     $this->rightFooter = $m->button(Module::BTN_RESET_FORM) . ' ' . $m->button(Module::BTN_REGISTER);
 }
Exemple #2
0
    /**
     * @inheritdoc
     */
    public function init()
    {
        parent::init();
        $m = $this->_module;
        if ($this->model->scenario !== Module::SCN_EXPIRY) {
            if ($this->model->scenario !== Module::SCN_REGISTER) {
                $this->mergeAttributes(['username' => ['type' => Form::INPUT_TEXT], 'password' => ['type' => Form::INPUT_PASSWORD], 'rememberMe' => ['type' => Form::INPUT_CHECKBOX]]);
            }
            $this->leftFooter = $m->button(Module::BTN_FORGOT_PASSWORD) . $m->button(Module::BTN_NEW_USER);
            $this->rightFooter = $m->button(Module::BTN_LOGIN);
            if ($this->hasSocialAuth && $m->socialSettings['widgetEnabled']) {
                $social = $m->getSocialWidget();
                if (!isset($this->template)) {
                    $this->template = <<<HTML
<div class="row">
    <div class="col-sm-8">
        <legend>{$this->title}</legend>
        {fields}
    </div>
    <div class="col-sm-4">
        <legend>{$this->authTitle}</legend>
        {$social}
    </div>
</div>
{footer}
HTML;
                } else {
                    $this->template = str_replace('{social}', $social, $this->template);
                }
            }
        } else {
            $password = ['type' => Form::INPUT_PASSWORD];
            if (in_array(Module::SCN_EXPIRY, $m->passwordSettings['strengthMeter'])) {
                $password = ['type' => Form::INPUT_WIDGET, 'widgetClass' => PasswordInput::classname(), 'options' => ['options' => ['placeholder' => Yii::t('user', 'Password'), 'autocomplete' => 'new-password']]];
            }
            $this->mergeAttributes(['username' => ['type' => Form::INPUT_HIDDEN], 'password' => ['type' => Form::INPUT_PASSWORD], 'password_new' => $password, 'password_confirm' => ['type' => Form::INPUT_PASSWORD]]);
            $this->leftFooter = Html::hiddenInput('unlock-account', '1', ['id' => 'unlock-account']);
            $this->rightFooter = $m->button(Module::BTN_SUBMIT_FORM);
        }
    }
</p>

        <?php 
$form = ActiveForm::begin(['id' => 'form-signup']);
?>

            <?php 
echo $form->field($model, 'username')->textInput(['placeholder' => Yii::t('app', 'Create your username'), 'autofocus' => true]);
?>

            <?php 
echo $form->field($model, 'email')->input('email', ['placeholder' => Yii::t('app', 'Enter your e-mail')]);
?>

            <?php 
echo $form->field($model, 'password')->widget(PasswordInput::classname(), ['options' => ['placeholder' => Yii::t('app', 'Create your password')]]);
?>

            <div class="form-group">
                <?php 
echo Html::submitButton(Yii::t('app', 'Signup'), ['class' => 'btn btn-primary', 'name' => 'signup-button']);
?>
            </div>

        <?php 
ActiveForm::end();
?>

        <?php 
if ($model->scenario === 'rna') {
    ?>
Exemple #4
0
 /**
  * @param null $options
  * @param null $pluginOptions
  *
  * @return string
  * @throws \Exception
  */
 public function getItem($options = null, $pluginOptions = null)
 {
     switch ($this->type) {
         case self::TYPE_TEXT:
             return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']);
         case self::TYPE_EMAIL:
             return Html::input('email', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']);
         case self::TYPE_NUMBER:
             return Html::input('number', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']);
         case self::TYPE_TEXTAREA:
             return Html::textarea('Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']);
         case self::TYPE_COLOR:
             return ColorInput::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'options' => $options != null ? $options : ['class' => 'form-control']]);
         case self::TYPE_DATE:
             return DatePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]);
         case self::TYPE_TIME:
             return TimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['minuteStep' => 1, 'showSeconds' => true, 'showMeridian' => false]]);
         case self::TYPE_DATETIME:
             return DateTimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['format' => 'yyyy-mm-dd H:i:s', 'todayHighlight' => true]]);
         case self::TYPE_PASSWORD:
             return PasswordInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['showMeter' => true, 'toggleMask' => false]]);
         case self::TYPE_ROXYMCE:
             return RoxyMceWidget::widget(['id' => 'Setting_' . $this->code, 'name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'action' => Url::to(['roxymce/default']), 'options' => $options != null ? $options : ['title' => $this->getName()], 'clientOptions' => $pluginOptions != null ? $pluginOptions : []]);
         case self::TYPE_SELECT:
             return Select2::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'data' => $this->getStoreRange(), 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['allowClear' => true]]);
         case self::TYPE_MULTI_SELECT:
             $options['multiple'] = true;
             if (!isset($options['class'])) {
                 $options['class'] = 'form-control';
             }
             return Select2::widget(['name' => 'Setting[' . $this->code . ']', 'value' => explode(",", $this->value), 'data' => $this->getStoreRange(), 'options' => $options, 'pluginOptions' => ['allowClear' => true]]);
         case self::TYPE_FILE_PATH:
             $value = Yii::getAlias($this->store_dir) . DIRECTORY_SEPARATOR . $this->value;
             return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control', 'multiple' => false], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreview' => !$this->isNewRecord ? [$this->value] : []]]);
         case self::TYPE_FILE_URL:
             $value = $this->store_url . '/' . $this->value;
             return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreviewAsData' => true, 'initialPreviewFileType' => self::fileType(pathinfo($this->value, PATHINFO_EXTENSION)), 'initialPreview' => !$this->isNewRecord ? $value : [], 'initialCaption' => $this->value]]);
         case self::TYPE_PERCENT:
             return RangeInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'html5Options' => ['min' => 0, 'max' => 100, 'step' => 1], 'options' => $options != null ? $options : ['class' => 'form-control'], 'addon' => ['append' => ['content' => '%']]]);
         case self::TYPE_SWITCH:
             $selector = explode(',', $this->store_range);
             if (count($selector) != 2) {
                 throw new ErrorException(Yii::t('setting', 'Switch Field should have store with 2 value, and negative is first. Example: no,yes'), 500);
             }
             return Html::hiddenInput('Setting[' . $this->code . ']', $selector[0]) . SwitchInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $selector[1], 'containerOptions' => ['class' => 'nv-switch-container'], 'options' => $options != null ? $options : [], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['state' => $this->value == $selector[1], 'size' => 'small', 'offText' => ucfirst($selector[0]), 'onText' => ucfirst($selector[1])]]);
         case self::TYPE_CHECKBOX:
             $random = rand(1000, 9999);
             return Html::checkboxList('Setting[' . $this->code . ']', explode(",", $this->value), $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list checkbox', 'item' => function ($index, $label, $name, $checked, $value) use($random) {
                 $html = Html::beginTag('div');
                 $html .= Html::checkbox($name, $checked, ['id' => 'Setting_checkbox_' . $label . '_' . $index . '_' . $random, 'value' => $value]);
                 $html .= Html::label($label, 'Setting_checkbox_' . $label . '_' . $index . '_' . $random);
                 $html .= Html::endTag('div');
                 return $html;
             }]);
         case self::TYPE_RADIO:
             $random = rand(1000, 9999);
             return Html::radioList('Setting[' . $this->code . ']', $this->value, $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list radio', 'item' => function ($index, $label, $name, $checked, $value) use($random) {
                 $html = Html::beginTag('div');
                 $html .= Html::radio($name, $checked, ['id' => 'Setting_radio_' . $label . '_' . $index . '_' . $random, 'value' => $value]);
                 $html .= Html::label($label, 'Setting_radio_' . $label . '_' . $index . '_' . $random);
                 $html .= Html::endTag('div');
                 return $html;
             }]);
         case self::TYPE_SEPARATOR:
             return '<hr>';
         default:
             return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']);
     }
 }
echo Html::encode($this->title) . " для " . $model->username;
?>
</h1>

    <div class="links-form">

        <?php 
$form = ActiveForm::begin();
?>

        <?php 
echo $form->field($model, 'password')->widget(PasswordInput::classname());
?>

        <?php 
echo $form->field($model, 'repeatPassword')->widget(PasswordInput::classname());
?>
        <div class="form-group">
            <?php 
echo Html::submitButton('Сохранить', ['class' => 'btn btn-success']);
?>
        </div>

        <?php 
ActiveForm::end();
?>

    </div>

</div>
Exemple #6
0
?>
</h1>
</div>
<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 4]]);
echo $form->errorSummary($model);
?>
<!-- dummy inputs to prevent auto fill -->
<input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;" />
<input type="password" name="password_fake" id="password_fake" value="" style="display:none;" />
<div class="row">
    <div class="col-md-8">
        <?php 
echo $form->field($model, 'username')->textInput(['maxlength' => 128, 'autocomplete' => 'new_username']);
if (in_array(Module::SCN_ADMIN, $m->passwordSettings['strengthMeter'])) {
    echo $form->field($model, 'password')->widget(PasswordInput::classname(), []);
} else {
    echo $form->field($model, 'password')->passwordInput();
}
echo $form->field($model, 'email')->textInput(['maxlength' => 255]);
echo $form->field($model, 'status')->widget(Select2::classname(), ['data' => $m->getEditStatuses(), 'options' => ['options' => $m->getDisabledStatuses()]]);
?>
    </div>
</div>
<hr>
<div class="text-right">
    <?php 
echo $m->button(Module::BTN_RESET_FORM);
?>
 
    <?php 
?>
</h1>

    <div class="col-md-5 well bs-component">

        <p><?php 
echo Yii::t('app', 'Please choose your new password:'******'id' => 'reset-password-form']);
?>

            <?php 
echo $form->field($model, 'password')->widget(PasswordInput::classname(), ['options' => ['placeholder' => Yii::t('app', 'Enter new password'), 'autofocus' => true]]);
?>

            <div class="form-group">
                <?php 
echo Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-primary']);
?>
            </div>
            
        <?php 
ActiveForm::end();
?>

    </div>

</div>
Exemple #8
0
?>

<div class="mdlpermission-form">

    <?php 
$form = ActiveForm::begin(['id' => $model->formName(), 'enableClientValidation' => true]);
?>

     <?php 
echo $form->field($model, 'username')->textInput();
?>

     <!-- $form->field($model, 'password_hash')->passwordInput()?> -->

      <?php 
echo $form->field($model, 'password_hash')->widget(PasswordInput::classname());
?>

      <?php 
echo $form->field($model, 'EMP_ID')->widget(Select2::classname(), ['data' => $data, 'language' => 'en', 'options' => ['placeholder' => 'Select...'], 'pluginOptions' => ['allowClear' => true]]);
?>



    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
Exemple #9
0
use kartik\widgets\FileInput;
use kartik\icons\Icon;
use kartik\popover\PopoverX;
use kartik\password\PasswordInput;
/**
 * @var yii\web\View $this
 * @var common\models\Osusuarios $model
 */
$this->title = $model->usu_nombre;
$this->params['breadcrumbs'][] = ['label' => Yii::t('admin', 'Osusuarios'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $model->usu_nomusu;
?>
<div class="osusuarios-view">
    <!--<div class="page-header">
        <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    </div>-->


    <?php 
echo DetailView::widget(['model' => $model, 'condensed' => false, 'hover' => true, 'mode' => Yii::$app->request->get('edit') == 't' ? DetailView::MODE_EDIT : DetailView::MODE_VIEW, 'panel' => ['heading' => $this->title, 'type' => DetailView::TYPE_INFO], 'formOptions' => ['options' => ['enctype' => 'multipart/form-data']], 'attributes' => [['attribute' => 'uploadedFile', 'format' => 'raw', 'value' => $model->usu_type ? '<a href="#" class="thumbnail">
                        <img src="data:' . $model->usu_type . ';base64,' . base64_encode($model->usu_foto) . '" alt="" class="">
                    </a>' : '<a href="#" class="thumbnail">
                        <img src="' . Yii::$app->params['assetUrl'] . 'images/noavatar_man.png" alt="" class="">
                    </a>', 'type' => DetailView::INPUT_WIDGET, 'widgetOptions' => ['class' => FileInput::classname(), 'pluginOptions' => ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => Yii::t('admin', 'Select Photo')], 'options' => ['accept' => 'image/*']]], 'usu_nomusu', 'usu_nombre', ['attribute' => 'usu_feccre', 'format' => ['datetime', isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime']) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A'], 'type' => DetailView::INPUT_WIDGET, 'displayOnly' => true, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATETIME]], ['attribute' => 'usu_ulting', 'format' => ['datetime', isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime']) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A'], 'type' => DetailView::INPUT_WIDGET, 'displayOnly' => true, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATETIME]], ['attribute' => 'usu_activo', 'format' => 'raw', 'value' => $model->usu_activo ? '<span class="label label-success">Activo</span>' : '<span class="label label-danger">Inactivo</span>', 'type' => DetailView::INPUT_SWITCH], ['attribute' => 'usu_ultemp', 'displayOnly' => true]], 'deleteOptions' => ['url' => ['delete', 'id' => $model->usu_id], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']], 'enableEditMode' => true, 'buttons' => [['label' => Icon::show('key'), 'title' => Yii::t('admin', 'Change Password'), 'html' => PopoverX::widget(['header' => '<i class="glyphicon glyphicon-lock"></i> ' . Yii::t('admin', 'Change Password'), 'placement' => PopoverX::ALIGN_BOTTOM_RIGHT, 'size' => PopoverX::SIZE_LARGE, 'footer' => Html::submitButton(Yii::t('admin', 'Enviar'), ['class' => 'btn btn-sm btn-primary']), 'content' => '<label class="control-label">' . Yii::t('admin', 'Password') . '</label>' . PasswordInput::widget(['model' => $model, 'attribute' => 'passwd']), 'toggleButton' => ['label' => Icon::show('key'), 'class' => 'btn btn-xs btn-info', 'data-toggle' => 'tooltip', 'data-original-title' => Yii::t('admin', 'Change Password')]])]]]);
?>

</div>
Exemple #10
0
<table class="form-table">

    <!-- OLD PASSWORD -->
    <?php 
echo $form->field($model, 'password_old', ['options' => ['tag' => 'tr'], 'labelOptions' => ['class' => false, 'label' => '<strong>' . $model->getAttributeLabel('password_old') . '</strong>'], 'inputOptions' => ['class' => 'textfield'], 'errorOptions' => ['tag' => 'span', 'class' => 'error-text', 'for' => 'changepasword-password_old', 'style' => 'display: none;'], 'template' => "<td>{label}</td><td><div class='form-table-box'>{input}{error}</div></td>"])->passwordInput();
?>

    <!-- NEW PASSWORD -->
    <?php 
$strength = Yii::t('profile', 'password_strength');
$tooShort = Yii::t('profile', 'password_too_short');
$veryWeak = Yii::t('profile', 'password_very_weak');
$weak = Yii::t('profile', 'password_weak');
$good = Yii::t('profile', 'password_good');
$strong = Yii::t('profile', 'password_strong');
$veryStrong = Yii::t('profile', 'password_very_strong');
$strengthTemplate = "<div class='password-strength'>\n                                <ul id='indicator'>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                    <li></li>\n                                </ul>\n                                <ul style='display:none;' id='verdict'>\n                                    <li id='tooShort'>{$tooShort}</li>\n                                    <li id='veryWeak'>{$veryWeak}</li>\n                                    <li id='weak'>{$weak}</li>\n                                    <li id='good'>{$good}</li>\n                                    <li id='strong'>{$strong}</li>\n                                    <li id='veryStrong'>{$veryStrong}</li>\n                                </ul>\n                                <span>{$strength} — <span id='strengthVerdict'>{$tooShort}</span></span>\n                            </div>";
echo $form->field($model, 'password', ['options' => ['tag' => 'tr'], 'labelOptions' => ['class' => false, 'label' => '<strong>' . $model->getAttributeLabel('password') . '</strong>'], 'inputOptions' => ['class' => 'textfield'], 'errorOptions' => ['tag' => 'span', 'class' => 'error-text', 'for' => 'changepasword-password', 'style' => 'display: none;'], 'template' => "<td>{label}</td><td><div class='form-table-box pull-left'>{input}{error}</div>{$strengthTemplate}</td>"])->widget(PasswordInput::classname(), ['pluginOptions' => ['language' => 'ru', 'showMeter' => false, 'toggleMask' => false, 'showToggle' => false, 'rules' => ['midChar' => 2, 'consecAlphaUC' => 2, 'consecAlphaLC' => 2, 'consecNumber' => 2, 'seqAlpha' => 3, 'seqNumber' => 3, 'seqSymbol' => 3, 'length' => 4, 'number' => 4, 'symbol' => 6], 'inputClass' => 'textfield', 'mainTemplate' => '<table class="kv-strength-container">
                                       <tr>
                                           <td>{input}</td>
                                       </tr>
                                   </table>']]);
?>

    <!-- REPEAT PASSWORD -->
    <?php 
echo $form->field($model, 'password_repeat', ['options' => ['tag' => 'tr'], 'labelOptions' => ['class' => false, 'label' => '<strong>' . $model->getAttributeLabel('password_repeat') . '</strong>'], 'inputOptions' => ['class' => 'textfield'], 'errorOptions' => ['tag' => 'span', 'class' => 'error-text', 'for' => 'changepasword-password_repeat', 'style' => 'display: none;'], 'template' => "<td>{label}</td><td><div class='form-table-box'>{input}{error}</div></td>"])->passwordInput();
?>

</table>
Exemple #11
0
?>
</h1>
    </div>
<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 4]]);
?>
    <div class="row">
        <div class="col-md-8">
            <?php 
echo $form->field($model, 'password')->passwordInput(['placeholder' => Yii::t('user', 'Enter current password')]);
?>
            <?php 
if (in_array(Module::SCN_CHANGEPASS, $m->passwordSettings['strengthMeter'])) {
    ?>
                <?php 
    echo $form->field($model, 'password_new')->widget(PasswordInput::classname(), ['options' => ['placeholder' => Yii::t('user', 'Enter new password')]]);
    ?>
            <?php 
} else {
    ?>
                <?php 
    echo $form->field($model, 'password_new')->passwordInput(['placeholder' => Yii::t('user', 'Enter new password')]);
    ?>
            <?php 
}
?>
            <?php 
echo $form->field($model, 'password_confirm')->passwordInput(['placeholder' => Yii::t('user', 'Confirm new password')]);
?>
        </div>
    </div>
?>

        <?php 
if ($user->scenario === 'create') {
    ?>

            <?php 
    echo $form->field($user, 'password')->widget(PasswordInput::classname(), ['options' => ['placeholder' => Yii::t('app', 'Create password')]]);
    ?>

        <?php 
} else {
    ?>

            <?php 
    echo $form->field($user, 'password')->widget(PasswordInput::classname(), ['options' => ['placeholder' => Yii::t('app', 'Change password ( if you want )')]]);
    ?>
 

        <?php 
}
?>

    <div class="row">
        <div class="col-md-6">

        <?php 
echo $form->field($user, 'status')->dropDownList($user->statusList);
?>

        <?php 
Exemple #13
0
echo $form->field($model, 'email', ['addon' => Yii::$app->params['defaultAddons']['email']]);
?>
                </div>

                <div class="col-md-4">
                    <?php 
echo $form->field($model, 'group_id', ['template' => "{label}{input}{error}{hint}"])->dropDownList((new Group())->getDropdownOptions('name'), ['prompt' => '::' . Yii::t('user', 'Select a User Group') . '::']);
?>
                </div>

            </div>

            <div class="row">
                <div class="col-md-4">
                    <?php 
echo $form->field($model, 'password')->passwordInput(['maxlength' => true])->hint($model->isNewRecord ? null : Yii::t('user', 'Password message'))->widget(PasswordInput::classname(), ['language' => 'pt-BR']);
?>
                </div>
            </div>

            <div class="row">
                <div class="col-md-3">
                    <?php 
echo $form->field($model, 'repeatPassword')->passwordInput(['maxlength' => true]);
?>
                </div>
            </div>

            <?php 
echo $form->field($model, 'status')->checkbox();
?>
<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\password\PasswordInput;
?>
	<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'id' => 'password-utama-login', 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'method' => 'post', 'action' => ['/sistem/crm-user-profile/password-utama-save']]);
?>
	<?php 
echo $form->field($validationFormLogin, 'oldpassword')->widget(PasswordInput::classname(), ['options' => []]);
?>
	<?php 
echo $form->field($validationFormLogin, 'password')->widget(PasswordInput::classname());
?>
	<?php 
echo $form->field($validationFormLogin, 'repassword')->widget(PasswordInput::classname());
?>
		<div style="text-align: right;">
			<?php 
echo Html::submitButton('Saved', ['class' => 'btn btn-primary']);
?>
		</div>

	<?php 
ActiveForm::end();
<div class="panel panel-default">
    <div class="panel-heading">
        <div class="page-header" style="padding-left: 10px;">
            <h1><?php 
echo Html::encode($this->title);
?>
</h1>
            <small>Please feels free to update your password</small>
            </div>
        </div>
        <div class="panel-body">
            <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'options' => ['enctype' => 'multipart/form-data']]);
?>
            <?php 
$form = ActiveForm::begin(['id' => 'login-form']);
echo $form->field($model, 'password')->widget(PasswordInput::classname(), ['pluginOptions' => ['showMeter' => true, 'toggleMask' => false]]);
?>
            <hr/>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-9">
                    <?php 
echo Html::submitButton('Update', ['class' => 'btn btn-primary btn-block']);
ActiveForm::end();
?>
                </div>
            </div>

        </div>
    </div>
</div>
Exemple #16
0
<div class="mdlpermission-form">

    <?php 
$form = ActiveForm::begin(['id' => $model->formName(), 'enableClientValidation' => true]);
?>

     <?php 
echo $form->field($model, 'username')->textInput();
?>

     <!-- $form->field($model, 'old_pass')->textInput()?> -->

      <!-- $form->field($model, 'password_hash')->passwordInput()?> -->
    <?php 
echo $form->field($model, 'new_pass')->widget(PasswordInput::classname());
?>
    <?php 
if (!$model->IsNewRecord) {
    echo $form->field($model, 'status')->dropDownList(['' => ' -- Silahkan Pilih --', '1' => 'Tidak Aktif', '10' => 'Aktif']);
}
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php