public function asTipKursa($value, $short = false) { return static::asEnum2($value, TipKursa::className(), $short); }
public function rules() { return [['tip', 'in', 'range' => TipKursa::items()], ['tip', 'default'], ['kategorii_slushatelej', 'each', 'rule' => ['integer']], ['kategorii_slushatelej', 'default'], ['nazvanie', 'filter', 'filter' => 'mb_strtolower'], ['nazvanie', SqueezeLineFilter::className()], ['nazvanie', NazvanieValidator::className()], ['nazvanie', 'default'], ['rukovoditel', 'integer'], ['rukovoditel', 'default'], ['raschitano_chasov', ChasyObucheniyaValidator::className()], ['raschitano_chasov', 'default'], ['nachnutsya_posle', DateValidator::className(), 'timestampAttribute' => 'nachnutsya_posle'], ['nachnutsya_posle', 'default'], ['zakonchatsya_do', DateValidator::className(), 'timestampAttribute' => 'zakonchatsya_do'], ['zakonchatsya_do', 'default']]; }
public function rules() { return [['god', 'integer', 'min' => 2015, 'max' => 2020], ['tip', Enum2Validator::className(), 'enum' => TipKursa::className()], ['nazvanie', 'string', 'max' => '400'], ['rukovoditelId', 'integer'], [['dateStart', 'dateEnd'], 'date'], [['chasyStart', 'chasyEnd'], 'integer']]; }
*/ $this->registerJs('mybriop.planProspektEditor.gridSearchInit(".grid-search-container");'); ?> <div class = 'grid-search-container'> <a href="#" class="grid-search-switch" data-pjax="0">Фильтры</a> <?php $form = ActiveForm::begin(['options' => ['class' => 'grid-search', 'style' => $searchModel->hasValues() ? null : 'display:none'], 'method' => 'get', 'action' => $formActionUrl, 'layout' => 'horizontal', 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-3', 'wrapper' => 'col-sm-9']]]); ?> <div class="col-md-6"> <?php echo $form->field($searchModel, 'tip')->widget(Select2::className(), ['data' => TipKursa::names(), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($searchModel, 'nazvanie')->textInput(); ?> <?php echo $form->field($searchModel, 'kategorii_slushatelej')->widget(Select2::className(), ['data' => $kategoriiSlushatelej, 'options' => ['multiple' => true], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="col-md-6"> <?php
public function rules() { return [['kategorii_slushatelej', 'required'], ['kategorii_slushatelej', 'each', 'rule' => ['integer', 'min' => 1]], ['kategorii_slushatelej_input', 'filter', 'filter' => $this->emptyRemover()], ['kategorii_slushatelej_input', 'each', 'rule' => [SqueezeLineFilter::className()]], ['kategorii_slushatelej_input', 'each', 'rule' => [NazvanieValidator::className()]], ['nazvanie', 'required'], ['nazvanie', SqueezeLineFilter::className()], ['nazvanie', NazvanieValidator::className()], ['annotaciya', SqueezeTextFilter::className()], ['annotaciya', 'default'], ['raschitano_chasov', 'required'], ['raschitano_chasov', ChasyObucheniyaValidator::className()], ['formy_obucheniya_widget', 'each', 'rule' => [Enum2Validator::className(), 'enum' => FormaObucheniya::className()]], ['formy_obucheniya_widget', 'default'], ['ochnoe_nachalo', DateValidator::className(), 'timestampAttribute' => 'ochnoe_nachalo'], ['ochnoe_konec', DateValidator::className(), 'timestampAttribute' => 'ochnoe_konec'], ['zaochnoe_nachalo', DateValidator::className(), 'timestampAttribute' => 'zaochnoe_nachalo'], ['zaochnoe_konec', DateValidator::className(), 'timestampAttribute' => 'zaochnoe_konec'], [['ochnoe_nachalo', 'ochnoe_konec', 'zaochnoe_nachalo', 'zaochnoe_konec'], 'default'], ['raschitano_slushatelej', 'integer', 'min' => 0], ['raschitano_slushatelej', 'default'], ['rukovoditel', 'exist', 'targetClass' => FizLico::className(), 'targetAttribute' => 'id'], ['rukovoditel', 'default'], ['finansirovanie', 'required'], ['finansirovanie', Enum2Validator::className(), 'enum' => TipFinansirovaniya::className()], ['tip', 'required'], ['tip', Enum2Validator::className(), 'enum' => TipKursa::className()], ['plan_prospekt_god', 'required'], ['plan_prospekt_god', 'in', 'range' => ['2015-01-01', '2016-01-01', '2017-01-01', '2018-01-01']], ['iup', 'boolean'], ['iup', 'default', 'value' => false]]; }
<a href="#" class="apply-btn btn btn-primary">Запоточить...</a> {{/if}} </script> <div class="upravlenie-kursami-potok"> <form id="kurs-filter" onsubmit="return false;"> <div class="form-group col-md-2"> <?php echo Html::dropDownList('god', null, $years, ['class' => 'form-control', 'prompt' => 'Год']); ?> </div> <div class="form-group col-md-2"> <?php echo Html::dropDownList('tip', null, TipKursa::shortNames(), ['class' => 'form-control', 'prompt' => 'Тип']); ?> </div> <div class="form-group col-md-8"> <input name="nazvanie" class="form-control" placeholder="Название"> </div> <!-- <div class="form-group col-md-2">--> <!-- <input name="status" class="form-control" placeholder="Статус">--> <!-- </div>--> <div class="form-group col-md-2"> <div class='input-group date'> <input name="dateStart" class="form-control" placeholder="В период с..."> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div>
<?php echo KategoriiSlushatelejInputFields::widget(['form' => $form, 'model' => $model, 'attribute' => 'kategorii_slushatelej_input']); ?> </div> <?php echo $form->field($model, 'raschitano_slushatelej', ['options' => ['class' => 'form-group col-md-6']])->widget(TouchSpin::className()); ?> </div> <div class="row"> <?php echo $form->field($model, 'tip', ['options' => ['class' => 'form-group col-md-6']])->widget(Select2::className(), ['data' => TipKursa::names(), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'formy_obucheniya_widget', ['options' => ['class' => 'form-group col-md-6']])->widget(Select2::className(), ['data' => FormaObucheniya::names(), 'options' => ['placeholder' => '', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="row"> <?php echo $form->field($model, 'raschitano_chasov', ['options' => ['class' => 'form-group col-md-4']])->widget(TouchSpin::className()); ?> <?php