<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use \dmstr\bootstrap\Tabs;
use yii\helpers\StringHelper;
/**
* @var yii\web\View $this
* @var app\models\Test $model
* @var yii\widgets\ActiveForm $form
* @var string $relAttributes relation fields names for disabling
*/
?>
<div class="test-form">
<?php $form = ActiveForm::begin([
'id' => 'Test',
'layout' => 'horizontal',
'enableClientValidation' => true,
'errorSummaryCssClass' => 'error-summary alert alert-error'
]
);
?>
<div class="">
<?php $this->beginBlock('main'); ?>
<p>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'createdate')->textInput() ?>
<?= $form->field($model, 'update_dt')->textInput() ?>
</p>
<?php $this->endBlock(); ?>
<?=
Tabs::widget(
[
'encodeLabels' => false,
'items' => [ [
'label' => Yii::t('app', StringHelper::basename('app\models\Test')),
'content' => $this->blocks['main'],
'active' => true,
], ]
]
);
?>
<hr/>
<?php echo $form->errorSummary($model); ?>
<?= Html::submitButton(
'<span class="glyphicon glyphicon-check"></span> ' .
($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save')),
[
'id' => 'save-' . $model->formName(),
'class' => 'btn btn-success'
]
);
?>
<?php ActiveForm::end(); ?>
</div>
</div>
|