<div class="dashboard-create"> <?php $form = ActiveForm::begin(['id' => 'dashboard-form', 'enableClientValidation' => false, 'errorSummaryCssClass' => 'alert alert-danger error-summary']); ?> <?php echo $form->errorSummary($model); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'layout_class')->dropDownList(array_flip(Module::getInstance()->layouts), ['prompt' => '']); ?> <?php echo $form->field($model, 'sort')->textInput(); ?> <?php echo $form->field($model, 'enabled')->checkbox(); ?> <?php echo Html::submitButton('<span class="fa fa-check"></span> ' . Yii::t('dashboard', 'Create'), ['id' => 'save-' . $model->formName(), 'class' => 'btn btn-success']); ?> <?php
/** * @return Connection */ public static function getDb() { return Module::getInstance()->getDb(); }