Esempio n. 1
0
use themes\admin360\widgets\Button;
use yii\bootstrap\ActiveForm;
use themes\admin360\widgets\ActionButtons;
use modules\user\backend\models\User;
use modules\user\common\widgets\ShowPassword;
echo ActionButtons::widget(['modelID' => $model->id, 'buttons' => ['index' => ['label' => 'مدیریت کاربران'], 'view' => ['url' => ['view', 'id' => $model->id], 'type' => 'success', 'icon' => 'eye', 'label' => 'مشاهده اطلاعات کاربر']]]);
Panel::begin(['title' => 'تغییر کلمه عبور']);
?>
    <div class="user-form">
        <?php 
$form = ActiveForm::begin(['enableClientValidation' => true, 'id' => 'user-form']);
?>
        <div class="row">
            <div class="col-md-8">
                <?php 
echo $form->field($model, 'password')->widget(ShowPassword::className(), ['options' => ['class' => 'form-control']])->label('کلمه عبور جدید');
?>
            </div>
            <div class="col-md-4">
                <?php 
echo Html::submitButton('<i class="fa fa-save"></i> ذخیره', ['class' => 'btn btn-lg btn-success']);
?>
                <?php 
echo Button::widget(['label' => 'انصراف', 'options' => ['class' => 'btn-lg'], 'type' => 'warning', 'icon' => 'undo', 'url' => ['view', 'id' => $model->id]]);
?>
            </div>
        </div>
        <?php 
ActiveForm::end();
?>
    </div>
Esempio n. 2
0
File: _form.php Progetto: ahb360/cms
    <?php 
$form = ActiveForm::begin(['enableClientValidation' => true, 'id' => 'user-form']);
?>
    <div class="row">
        <div class="col-md-8">
        <?php 
Panel::begin(['title' => 'اطلاعات کاربر', 'options' => ['class' => 'panel-primary']]);
?>
            <?php 
echo $form->field($model, 'email')->textInput(['class' => 'form-control input-medium', 'style' => 'direction:ltr']);
?>
            <?php 
if ($model->isNewRecord) {
    ?>
                <?php 
    echo $form->field($model, 'password')->widget(ShowPassword::className(), ['options' => ['class' => 'form-control']]);
    ?>
            <?php 
}
?>
            <?php 
echo $form->field($model, 'type')->dropDownList([User::TYPE_OPERATOR => 'اپراتور', User::TYPE_EDITOR => 'سردبیر', User::TYPE_SUPERUSER => 'مدیر سیستم'], ['class' => 'form-control input-small']);
?>
            <?php 
echo $form->field($model, 'status')->dropDownList(User::statusLabels(), ['class' => 'form-control input-small']);
?>
            <div class="form-group">
                <?php 
echo Html::submitButton('<i class="fa fa-save"></i> ذخیره', ['class' => 'btn btn-lg btn-success']);
?>