<?php echo $form->fieldSet(\Yii::t('skeeks/cms', 'General information')); ?> <?php echo $form->fieldRadioListBoolean($model, 'active'); ?> <?php echo $form->field($model, 'gender')->radioList(['men' => \Yii::t('skeeks/cms', 'Male'), 'women' => \Yii::t('skeeks/cms', 'Female')]); ?> <?php echo $form->field($model, 'image_id')->widget(\skeeks\cms\widgets\formInputs\StorageImage::className()); ?> <div class="row"> <div class="col-md-5"> <?php echo $form->field($model, 'username')->textInput(['maxlength' => 25])->hint(\Yii::t('skeeks/cms', 'The unique username. Used for authorization and to form links to personal cabinet.')); ?> </div> <div class="col-md-5"> <?php echo $form->field($model, 'name')->textInput(); ?> </div> </div>
<? \yii\bootstrap\Alert::begin(['options' => [ 'class' => 'alert-info', ]]); ?> <?php echo \Yii::t('skeeks/cms', 'At this tab displays all the files and images that are tied to the current element.'); ?> <? \yii\bootstrap\Alert::end(); ?> <? foreach($model->getBehaviors() as $behavior) : ?> <? \yii\bootstrap\ActiveForm::begin(); ?> <? if ($behavior instanceof \skeeks\cms\models\behaviors\HasStorageFile) : ?> <? foreach($behavior->fields as $fieldName) : ?> <?php echo $form->field($model, $fieldName)->widget(\skeeks\cms\widgets\formInputs\StorageImage::className(), ['viewItemTemplate' => '@skeeks/cms/views/admin-tools/one-file']); ?> <? endforeach; ?> <? elseif ($behavior instanceof \skeeks\cms\models\behaviors\HasStorageFileMulti) : ?> <? foreach($behavior->relations as $relationName) : ?> <?php echo $form->field($model, $relationName)->widget(\skeeks\cms\widgets\formInputs\ModelStorageFiles::className(), ['viewItemTemplate' => '@skeeks/cms/views/admin-tools/one-file']); ?> <? endforeach; ?> <? endif; ?> <? \yii\bootstrap\ActiveForm::end(); ?> <? endforeach; ?>