<?php
/** @var \common\components\BaseForm $this */
/** @var \common\modules\triggers\models\TriggerTrigger $model */
use \common\modules\triggers\components\conditions\Conditions;

$model = $this->model;

Yii::$app->controller->view->registerJsFile('/js/triggers/conditions/admin-block.js');

return [
    'activeForm' => [
        'id' => 'trigger-form'
    ],
    'elements' => [
        'table' => $model->getConditionTable(),
        'active' => [
            'type' => 'checkbox'
        ],
        'owner_id' => [
            'type' => 'hidden',
            'value' => (string)Yii::$app->user->id
        ],
        'name' => [
            'type' => 'text',
            'class' => 'form-control',
        ],
        'description' => [
            'type' => 'textarea',
            'class' => 'form-control'
        ],
        'message_template_id' => [
            'type' => 'dropdownlist',
            'items' => array('1' => 'first template', '2' => 'second template')
        ],
        'timeout' => [
            'type' => 'text',
            'class' => 'form-control'
        ]
    ],
    'buttons' => [
        'submit' => ['type' => 'submit', 'value' => 'Cохранить']
    ]
];