public function getForm() { Yii::import('zii.widgets.jui.CJuiDatePicker'); return array('showErrorSummary' => true, 'attributes' => array('class' => 'form-horizontal', 'id' => __CLASS__), 'elements' => array('content' => array('type' => 'form', 'title' => Yii::t('DiscountsModule.admin', 'Общая информация'), 'elements' => array('name' => array('type' => 'text'), 'switch' => array('type' => 'checkbox'), 'sum' => array('type' => 'text', 'hint' => $this->t('HINT_SUM')), 'start_date' => array('type' => 'CJuiDatePicker', 'htmlOptions' => array('class' => 'form-control'), 'options' => array('dateFormat' => 'yy-mm-dd ' . date('H:i:s'))), 'end_date' => array('type' => 'CJuiDatePicker', 'htmlOptions' => array('class' => 'form-control'), 'options' => array('dateFormat' => 'yy-mm-dd ' . date('H:i:s'))), 'manufacturers' => array('type' => 'dropdownlist', 'items' => Html::listData(ShopManufacturer::model()->orderByName()->findAll(), 'id', 'name'), 'multiple' => 'multiple', 'data-placeholder' => $this->t('HINT_MANUFACTURERS')), 'userRoles' => array('type' => 'dropdownlist', 'items' => DiscountHelper::getGroup(), 'multiple' => 'multiple')))), 'buttons' => array('submit' => array('type' => 'submit', 'class' => 'btn btn-success', 'label' => $this->isNewRecord ? Yii::t('app', 'CREATE', 0) : Yii::t('app', 'SAVE')))); }