_form.php 1022 Bytes
<?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>