<commit_before><?php

use yii\helpers\Html;
use skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab as ActiveForm;
use common\models\User;

/* @var $this yii\web\View */
/* @var $model \skeeks\cms\models\CmsUser */
/* @var $console \skeeks\cms\controllers\AdminUserController */

?>


<?php $form = \skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab::begin(); ?>
<?php  ?>

<?= $form->fieldSet(\Yii::t('app','General information'))?>


    <?= $form->fieldRadioListBoolean($model, 'active'); ?>

    <?= $form->field($model, 'gender')->radioList([
        'men'   => \Yii::t('app','Male'),
        'women' => \Yii::t('app','Female'),
    ]); ?>

    <?= $form->field($model, 'image_id')->widget(
        \skeeks\cms\widgets\formInputs\StorageImage::className()
    ); ?>

    <div class="row">
        <div class="col-md-5">
            <?= $form->field($model, 'username')->textInput(['maxlength' => 12])->hint(\Yii::t('app','The unique username. Used for authorization and to form links to personal cabinet.')); ?>
        </div>
        <div class="col-md-5">
            <?= $form->field($model, 'name')->textInput(); ?>
        </div>
    </div>



    <div class="row">
        <div class="col-md-5">
            <?= $form->field($model, 'email')->textInput(); ?>
            <? if (\Yii::$app->user->can(\skeeks\cms\rbac\CmsManager::PERMISSION_USER_FULL_EDIT)) : ?>
                <?= $form->field($model, 'email_is_approved')->checkbox(\Yii::$app->formatter->booleanFormat); ?>
            <? endif; ?>
        </div>
        <div class="col-md-5">
            <?= $form->field($model, 'phone')->textInput([
                'placeholder' => '+7 903 722-28-73'
            ]); ?>
            <? if (\Yii::$app->user->can(\skeeks\cms\rbac\CmsManager::PERMISSION_USER_FULL_EDIT)) : ?>
                <?= $form->field($model, 'phone_is_approved')->checkbox(\Yii::$app->formatter->booleanFormat); ?>
            <? endif; ?>
        </div>
    </div>


    <? if ($model->relatedProperties) : ?>
        <?= \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget([
            'content' => \Yii::t('app', 'Additional properties')
        ]); ?>
        <? if ($properties = $model->relatedProperties) : ?>
            <? foreach ($properties as $property) : ?>
                <?= $property->renderActiveForm($form, $model)?>
            <? endforeach; ?>
        <? endif; ?>

    <? else : ?>
        <?/*= \Yii::t('app','Additional properties are not set')*/?>
    <? endif; ?>


<?= $form->fieldSetEnd(); ?>

<? if (\Yii::$app->user->can(\skeeks\cms\rbac\CmsManager::PERMISSION_USER_FULL_EDIT)) : ?>
    <?= $form->fieldSet(\Yii::t('app','Groups'))?>

        <? $this->registerCss(<<<CSS
    .sx-checkbox label
    {
        width: 100%;
    }
CSS
    )?>
        <?= $form->field($model, 'roleNames')->checkboxList(
            \yii\helpers\ArrayHelper::map(\Yii::$app->authManager->getRoles(), 'name', 'description'), [
                'class' => 'sx-checkbox'
            ]
        ); ?>

    <?= $form->fieldSetEnd(); ?>
<? endif; ?>

<?= $form->fieldSet(\Yii::t('app','Password')); ?>

    <?= $form->field($passwordChange, '<PASSWORD>')->passwordInput() ?>
    <?= $form->field($passwordChange, 'new_password_confirm')->passwordInput() ?>

<?= $form->fieldSetEnd(); ?>

<?/*= $form->fieldSet(\Yii::t('app','Additionally'))*/?><!--
    <?/*= $form->field($model, 'city')->textInput(); */?>
    <?/*= $form->field($model, 'address')->textInput(); */?>
    <?/*= $form->field($model, 'info')->textarea(); */?>
    <?/*= $form->field($model, 'status_of_life')->textarea(); */?>
--><?/*= $form->fieldSetEnd(); */?>

<? if (!$model->isNewRecord) : ?>
    <?= $form->fieldSet(\Yii::t('app','Social profiles'))?><commit_msg>Removed authclient. In a separate package skeeks/cms-authclient<commit_after><?php

use yii\helpers\Html;
use skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab as ActiveForm;
use common\models\User;

/* @var $this yii\web\View */
/* @var $model \skeeks\cms\models\CmsUser */
/* @var $console \skeeks\cms\controllers\AdminUserController */

?>


<?php $form = \skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab::begin(); ?>
<?php  ?>

<?= $form->fieldSet(\Yii::t('app','General information'))?>


    <?= $form->fieldRadioListBoolean($model, 'active'); ?>

    <?= $form->field($model, 'gender')->radioList([
        'men'   => \Yii::t('app','Male'),
        'women' => \Yii::t('app','Female'),
    ]); ?>

    <?= $form->field($model, 'image_id')->widget(
        \skeeks\cms\widgets\formInputs\StorageImage::className()
    ); ?>

    <div class="row">
        <div class="col-md-5">
            <?= $form->field($model, 'username')->textInput(['maxlength' => 12])->hint(\Yii::t('app','The unique username. Used for authorization and to form links to personal cabinet.')); ?>
        </div>
        <div class="col-md-5">
            <?= $form->field($model, 'name')->textInput(); ?>
        </div>
    </div>



    <div class="row">
        <div class="col-md-5">
            <?= $form->field($model, 'email')->textInput(); ?>
            <? if (\Yii::$app->user->can(\skeeks\cms\rbac\CmsManager::PERMISSION_USER_FULL_EDIT)) : ?>
                <?= $form->field($model, 'email_is_approved')->checkbox(\Yii::$app->formatter->booleanFormat); ?>
            <? endif; ?>
        </div>
        <div class="col-md-5">
            <?= $form->field($model, 'phone')->textInput([
                'placeholder' => '+7 903 722-28-73'
            ]); ?>
            <? if (\Yii::$app->user->can(\skeeks\cms\rbac\CmsManager::PERMISSION_USER_FULL_EDIT)) : ?>
                <?= $form->field($model, 'phone_is_approved')->checkbox(\Yii::$app->formatter->booleanFormat); ?>
            <? endif; ?>
        </div>
    </div>


    <? if ($model->relatedProperties) : ?>
        <?= \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget([
            'content' => \Yii::t('app', 'Additional properties')
        ]); ?>
        <? if ($properties = $model->relatedProperties) : ?>
            <? foreach ($properties as $property) : ?>
                <?= $property->renderActiveForm($form, $model)?>
            <? endforeach; ?>
        <? endif; ?>

    <? else : ?>
        <?/*= \Yii::t('app','Additional properties are not set')*/?>
    <? endif; ?>


<?= $form->fieldSetEnd(); ?>

<? if (\Yii::$app->user->can(\skeeks\cms\rbac\CmsManager::PERMISSION_USER_FULL_EDIT)) : ?>
    <?= $form->fieldSet(\Yii::t('app','Groups'))?>

        <? $this->registerCss(<<<CSS
    .sx-checkbox label
    {
        width: 100%;
    }
CSS
    )?>
        <?= $form->field($model, 'roleNames')->checkboxList(
            \yii\helpers\ArrayHelper::map(\Yii::$app->authManager->getRoles(), 'name', 'description'), [
                'class' => 'sx-checkbox'
            ]
        ); ?>

    <?= $form->fieldSetEnd(); ?>
<? endif; ?>

<?= $form->fieldSet(\Yii::t('app','Password')); ?>

    <?= $form->field($passwordChange, '<PASSWORD>_password')->passwordInput() ?>
    <?= $form->field($passwordChange, 'new_password_confirm')->passwordInput() ?>

<?= $form->fieldSetEnd(); ?>

<?/*= $form->fieldSet(\Yii::t('app','Additionally'))*/?><!--
    <?/*= $form->field($model, 'city')->textInput(); */?>
    <?/*= $form->field($model, 'address')->textInput(); */?>
    <?/*= $form->field($model, 'info')->textarea(); */?>
    <?/*= $form->field($model, 'status_of_life')->textarea(); */?>
--><?/*= $form->fieldSetEnd(); */?>

<? if (!$model->isNewRecord && class_exists('\skeeks\cms\authclient\models\UserAuthClient')) : ?>
    <?= $form->fieldSet(\Yii::t('app','Social profiles'))?>
{'fraction_non_alphanumeric': 0.2525292340034161, 'fraction_numerical': 0.005255551175929575, 'mean_word_length': 2.8698525673614643, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 251, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1046093', 'n_tokens_mistral': 2590, 'n_tokens_neox': 2483, 'n_words': 310}