_form.php
1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use artbox\core\widgets\LanguageForm;
/* @var $this yii\web\View */
/* @var $model artbox\stock\models\City */
/* @var $form yii\widgets\ActiveForm */
/* @var $modelLangs artbox\stock\models\CityLang */
?>
<div class="city-form">
<?php $form = ActiveForm::begin(); ?>
<?= LanguageForm::widget(
[
'modelLangs' => $modelLangs,
'formView' => '@artbox/stock/views/city/_form_language',
'form' => $form,
]
) ?>
<?= $form->field($model, 'sort')
->textInput() ?>
<?= $form->field($model, 'status')
->checkbox() ?>
<div class="form-group">
<?= Html::submitButton(
$model->isNewRecord ? \Yii::t('stock', 'Create') : \Yii::t('stock', 'Update'),
[ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]
) ?>
</div>
<?php ActiveForm::end(); ?>
</div>