Exemplo n.º 1
0
<?php

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $generator \infinitydevphp\gii\crud\Generator */
use infinitydevphp\gii\assets\CrudGeneratorAssets;
use kartik\form\ActiveForm;
use infinitydevphp\gii\models\WidgetsCrud;
use infinitydevphp\MultipleModelValidator\widgets\MultipleInput;
use kartik\widgets\Select2;
CrudGeneratorAssets::register($this);
$form = ActiveForm::begin();
echo $form->field($generator, 'modelClass')->textInput(['id' => 'model-class']);
echo $form->field($generator, 'searchModelClass');
echo $form->field($generator, 'controllerClass');
echo $form->field($generator, 'baseControllerFrontendClass');
echo $form->field($generator, 'baseControllerBackendClass');
//echo $form->field($generator, 'moduleID');
echo $form->field($generator, 'indexWidgetType')->dropDownList(['grid' => 'GridView', 'list' => 'ListView']);
echo $form->field($generator, 'columns')->widget(MultipleInput::className(), ['attributeOptions' => ['enableAjaxValidation' => false, 'enableClientValidation' => true, 'validateOnChange' => true, 'validateOnSubmit' => true, 'validateOnBlur' => true], 'data' => $generator->columns, 'baseModel' => WidgetsCrud::className(), 'columns' => [['name' => 'fieldName', 'enableError' => true, 'title' => 'Length'], ['name' => 'widgetType', 'type' => Select2::className(), 'options' => ['data' => $generator->getWidgets()], 'title' => 'Widget Type']]]);
echo $form->field($generator, 'enableI18N')->checkbox();
echo $form->field($generator, 'messageCategory');
$form->end();
Exemplo n.º 2
0
if (!in_array('createMigration', $notVisible)) {
    echo $form->field($generator, $addition . 'createMigration')->checkbox();
}
if (!in_array('autoCreateTable', $notVisible)) {
    echo $form->field($generator, $addition . 'autoCreateTable')->checkbox();
}
if (!in_array('useTablePrefix', $notVisible)) {
    echo $form->field($generator, $addition . 'useTablePrefix')->checkbox();
}
if (!in_array('dropIfExists', $notVisible)) {
    echo $form->field($generator, $addition . 'dropIfExists')->checkbox();
}
if (!$emptyBox) {
    Box::end();
}
Box::begin(['type' => Box::TYPE_PRIMARY, 'withBorder' => true, 'title' => $titleBox, 'collapse' => true]);
if (!in_array('migrationName', $notVisible)) {
    echo $form->field($generator, $addition . 'migrationName')->hiddenInput()->label(false);
}
if (!in_array('tableName', $notVisible)) {
    echo $form->field($generator, $addition . 'tableName');
}
Box::begin(['type' => Box::TYPE_PRIMARY, 'withBorder' => true, 'title' => 'Input columns origin table', 'collapse' => true]);
echo $form->field($generator, $addition . 'fields')->widget(\infinitydevphp\MultipleModelValidator\widgets\MultipleInput::className(), ['attributeOptions' => ['enableAjaxValidation' => false, 'enableClientValidation' => true, 'validateOnChange' => true, 'validateOnSubmit' => true, 'validateOnBlur' => true], 'data' => $generator->fields, 'baseModel' => \infinitydevphp\gii\models\Field::className(), 'columns' => [['name' => 'name', 'enableError' => true, 'title' => 'Name'], ['name' => 'type', 'type' => \kartik\widgets\Select2::className(), 'options' => ['data' => \infinitydevphp\gii\models\Field::getTypes()], 'title' => 'Type'], ['name' => 'length', 'enableError' => true, 'title' => 'Length'], ['name' => 'isCompositeKey', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Composite PK'], ['name' => 'is_not_null', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Is Not Null'], ['name' => 'is_unique', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Unique'], ['name' => 'unsigned', 'enableError' => true, 'type' => 'checkbox', 'title' => 'Unsigned'], ['name' => 'comment', 'enableError' => true, 'title' => 'Comment'], ['name' => 'default', 'enableError' => true, 'title' => 'Default Value'], ['name' => 'precision', 'enableError' => true, 'title' => 'Precision'], ['name' => 'scale', 'enableError' => true, 'title' => 'Scale'], ['name' => 'fk_name', 'enableError' => true, 'title' => 'FK Name'], ['name' => 'related_table', 'enableError' => true, 'title' => 'Related table'], ['name' => 'related_field', 'enableError' => true, 'title' => 'Related field']]]);
Box::end();
Box::end();
?>

<script>

</script>