Exemplo n.º 1
0
<div class="attribute-form">

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

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

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

    <?php 
echo $form->field($model, 'type')->dropDownList(AttributeTypes::getChoices(), ['prompt' => '']);
?>

    <?php 
echo $form->field($model, 'fieldConfig[fieldType]')->dropDownList(AttributeTypes::getFieldTypeChoices(), ['prompt' => '']);
?>

    <?php 
echo $form->field($model, 'rulesConfig')->dropDownList(AttributeTypes::getValidatorChoices(), ['multiple' => true, 'prompt' => '']);
?>

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