Esempio n. 1
0
\$('#mod_entity_type_add').on('click',opencentitytypemod);

MODALJS;
$this->registerJs($modalJS);
?>

<div class="entity-form">

    <?php 
$form = ActiveForm::begin(['id' => 'EntityCreateForm', 'action' => Url::to(['/entity/default/create'])]);
?>

    <div class="row">
        <div class="col-md-12">
    <?php 
echo $form->field($model, 'entity_type_id')->widget(Select2::classname(), ['data' => EntityType::pdEntityType(), 'options' => ['placeholder' => 'Entity Type...'], 'addon' => ['prepend' => ['content' => Html::icon('globe')], 'append' => ['content' => Html::button(Html::icon('plus'), ['class' => 'btn btn-default', 'id' => 'mod_entity_type_add', 'title' => 'add new entity', 'data-toggle' => 'tooltip', 'href' => Url::to(['/entity/entity-type/create'])]), 'asButton' => true]], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <?php 
echo $form->field($model, 'prename')->textInput(['maxlength' => 100]);
?>
        </div>
        <div class="col-md-6">
            <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 140]);
?>
        </div>