Esempio n. 1
0
<div class="tour-fields-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'type')->textInput();
?>
    <?php 
echo $form->field($model, 'tour_id')->dropDownList(ArrayHelper::map(Tour::getTours(true), 'id', 'name'), ['prompt' => Yii::t('app', '-- Select tour --')]);
?>
    <?php 
echo $form->field($model, 'sort')->input(['number']);
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>