settings.php 1.17 KB
<?php
    /**
     * @var View     $this
     * @var Settings $model
     */
    
    use common\models\Settings;
    use artbox\gentelella\widgets\XPanel;
    use yii\bootstrap\ActiveForm;
    use yii\bootstrap\Html;
    use yii\web\View;
    
    $this->title = 'Settings';
    
    $this->params[ 'breadcrumbs' ][] = $this->title;
?>

<?php $panel = XPanel::begin(
    [
        'title'   => $this->title,
        'toolbar' => false,
    ]
); ?>

<div class="settings-form">
    
    <?php
        $form = ActiveForm::begin();
        
        echo $form->field($model, 'id')
                  ->textInput();
        
        echo $form->field($model, 'name')
                  ->textInput();
        
        echo $form->field($model, 'description')
                  ->textInput();
        
        echo $form->field($model, 'analytics')
                  ->textarea(
                      [
                          'rows' => 11,
                      ]
                  );
        
        echo Html::submitButton(
            'Save',
            [
                'class' => 'btn btn-primary',
            ]
        );
        ActiveForm::end();
    ?>

</div>

<?php $panel::end(); ?>