コード例 #1
0
 private static function dateToQuotedSql($date, $isNachalo = false)
 {
     if (!$date) {
         return $isNachalo ? "'-infinity'" : "'infinity'";
     }
     if (is_string($date)) {
         $date = DeprecatedDatePicker::toDatetime($date);
     }
     return \Yii::$app->db->quoteValue($date->format(DateTime::W3C));
 }
コード例 #2
0
ファイル: spisok.php プロジェクト: tsyrya/mybriop
            <?php 
echo $form->field($filterModel, 'rukovoditel')->widget(Select2::className(), ['data' => FizLico::findRukovoditeliKursov()->formattedAll(EntityQuery::DROP_DOWN, 'familiyaInicialy'), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>

            <?php 
echo $form->field($filterModel, 'chasy')->widget(TouchSpin::className());
?>
            <div class="row">
                <div class="col-md-6">
                    <?php 
echo $form->field($filterModel, 'nachalo')->widget(DeprecatedDatePicker::className());
?>
                </div>
                <div class="col-md-6">
                    <?php 
echo $form->field($filterModel, 'konec')->widget(DeprecatedDatePicker::className());
?>
                </div>
            </div>
        </div>
        <?php 
echo Html::endTag('div');
?>

        <?php 
echo Html::submitButton('Применить фильтры', ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::resetButton('Сбросить фильтры', ['class' => 'btn reset-btn']);
?>
コード例 #3
0
ファイル: zapis-na-kurs.php プロジェクト: tsyrya/mybriop
            <?php 
    echo $form->field($model, 'pasportKogdaVydan')->widget(DeprecatedDatePicker::classname());
    ?>

        </div>

        <div class="col-md-5 form-horizontal">
            <div class="fields-group-heading">
                <h3>Другие данные</h3>
            </div>

            <?php 
    echo $form->field($model, 'propiska');
    ?>
            <?php 
    echo $form->field($model, 'dataRozhdeniya')->widget(DeprecatedDatePicker::classname());
    ?>
            <?php 
    echo $form->field($model, 'snils')->widget(MaskedInput::className(), ['mask' => '999-999-999-99']);
    ?>
            <?php 
    echo $form->field($model, 'inn')->widget(MaskedInput::className(), ['mask' => '999999999999']);
    ?>

        </div>

    </div>
<?php 
}
?>
コード例 #4
0
ファイル: ZapisNaKursForm.php プロジェクト: tsyrya/mybriop
 private function populateByudzhetImpl()
 {
     $fiz_lico = FizLico::findOne($this->fizLico);
     if ($fiz_lico) {
         $this->pedStazh = $fiz_lico->pedStazh;
     }
     $rabota_fiz_lica = RabotaFizLica::find()->where(['fiz_lico' => $this->fizLico])->orderBy('id')->one();
     $dolzhnost_fiz_lica_na_rabote = $rabota_fiz_lica ? DolzhnostFizLicaNaRabote::find()->where(['rabota_fiz_lica' => $rabota_fiz_lica->id])->orderBy('id')->one() : null;
     if ($dolzhnost_fiz_lica_na_rabote) {
         list($this->dolzhnostId, $this->dolzhnostNazvanie) = DirectoryHelper::getForCombo(Dolzhnost::findOne($dolzhnost_fiz_lica_na_rabote->dolzhnost));
     }
     if ($dolzhnost_fiz_lica_na_rabote && ($stazh_v_dolzhnosti = StazhFizLica::findOne(['fiz_lico' => $this->fizLico, 'dolzhnost' => Val::of($dolzhnost_fiz_lica_na_rabote, 'dolzhnost')]))) {
         $this->stazhVDolzhnosti = $stazh_v_dolzhnosti->stazh;
     }
     if ($attestaciya_fiz_lica = $fiz_lico->attestaciyaFizLicaRel) {
         $this->kategoriya = $attestaciya_fiz_lica->kategoriya;
     }
     if ($obrazovanie_fiz_lica = ObrazovanieFizLica::find()->where(['fiz_lico' => $this->fizLico])->orderBy('id')->one()) {
         list($this->obrOrgId, $this->obrOrgNazvanie) = DirectoryHelper::getForCombo(Organizaciya::findOne($obrazovanie_fiz_lica->organizaciya));
         list($this->obrKvalifikaciyaId, $this->obrKvalifikaciyaNazvanie) = DirectoryHelper::getForCombo(Kvalifikaciya::findOne($obrazovanie_fiz_lica->kvalifikaciya));
         $this->obrDocTip = $obrazovanie_fiz_lica->dokumentObObrazovaniiTip;
         $this->obrDocSeriya = $obrazovanie_fiz_lica->dokumentObObrazovaniiSeriya;
         $this->obrDocNomer = $obrazovanie_fiz_lica->dokumentObObrazovaniiNomer;
         $this->obrDocData = DeprecatedDatePicker::fromDatetime($obrazovanie_fiz_lica->dokumentObObrazovaniiDataAsDate);
     }
     return $fiz_lico;
 }