Example #1
0
use yii\helpers\Html;
/**
 * @var $model ObrazovanieForm
 */
?>

<?php 
$form = ActiveForm::begin(['layout' => 'horizontal']);
echo $form->field($model, 'dokument_ob_obrazovanii_tip')->dropDownList(TipDokumentaObObrazovanii::namesMap());
echo $form->field($model, 'dokument_ob_obrazovanii_seriya');
echo $form->field($model, 'dokument_ob_obrazovanii_nomer');
echo $form->field($model, 'dokument_ob_obrazovanii_data')->widget(DatePicker::className());
?>

<?php 
echo $form->field($model, 'kvalifikaciyaDir')->widget(ComboWidget::className(), ['data' => Kvalifikaciya::find()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')]);
?>

<?php 
echo $form->field($model, 'organizaciyaDir')->widget(ComboWidget::className(), ['data' => Organizaciya::find()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')]);
?>

<?php 
echo $form->field($model, 'kurs_tip')->widget(Select2::className(), ['data' => TipKursa::namesMap(), 'hideSearch' => true, 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]]);
?>

<?php 
echo $form->field($model, 'kurs_nazvanie');
echo $form->field($model, 'kurs_chasy')->widget(TouchSpin::className());
?>
Example #2
0
 public function getKvalifikaciyaRel()
 {
     return $this->hasOne(Kvalifikaciya::className(), ['id' => 'kvalifikaciya'])->inverseOf('obrazovaniyaFizLicaRel');
 }
Example #3
0
echo SwitchingFields::widget(['commonOptions' => ['form' => $form, 'model' => $model, 'options' => ['template' => "{label}\n<div class=\"col-md-8\">\n{input}\n{hint}\n{error}\n{switch}\n</div>", 'options' => ['class' => 'form-group']]], 'field1Options' => ['attribute' => 'dolzhnostId', 'switchIntroText' => 'Не нашли в списке?', 'switchLinkText' => 'Нажмите здесь чтобы ввести должность вручную.', 'widgetClass' => Select2::className(), 'widgetConfig' => ['data' => Dolzhnost::find()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')], 'widgetConfigDisabled' => ['disabled' => true]], 'field2Options' => ['attribute' => 'dolzhnostNazvanie', 'switchIntroText' => 'Возможно ваша должность есть в списке.', 'switchLinkText' => 'Нажмите здесь чтобы найти её в списке.']]);
?>

    </div>

    <div class="col-md-5 form-horizontal">
        <div class="fields-group-heading">
            <h3>Образование</h3>
        </div>

        <?php 
echo SwitchingFields::widget(['commonOptions' => ['form' => $form, 'model' => $model, 'options' => ['template' => "{label}\n<div class=\"col-md-8\">\n{input}\n{hint}\n{error}\n{switch}\n</div>", 'options' => ['class' => 'form-group']]], 'field1Options' => ['attribute' => 'obrOrgId', 'switchIntroText' => 'Не нашли в списке?', 'switchLinkText' => 'Нажмите здесь чтобы ввести организацию вручную.', 'widgetClass' => Select2::className(), 'widgetConfig' => ['data' => Organizaciya::findVysshegoProfessionalnogoObrazovaniya()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')], 'widgetConfigDisabled' => ['disabled' => true]], 'field2Options' => ['attribute' => 'obrOrgNazvanie', 'switchIntroText' => 'Возможно ваша организация есть в списке.', 'switchLinkText' => 'Нажмите здесь чтобы найти её в списке.']]);
?>

        <?php 
echo SwitchingFields::widget(['commonOptions' => ['form' => $form, 'model' => $model, 'options' => ['template' => "{label}\n<div class=\"col-md-8\">\n{input}\n{hint}\n{error}\n{switch}\n</div>", 'options' => ['class' => 'form-group']]], 'field1Options' => ['attribute' => 'obrKvalifikaciyaId', 'switchIntroText' => 'Не нашли в списке?', 'switchLinkText' => 'Нажмите здесь чтобы ввести квалификацию вручную.', 'widgetClass' => Select2::className(), 'widgetConfig' => ['data' => Kvalifikaciya::find()->commonOnly()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie')], 'widgetConfigDisabled' => ['disabled' => true]], 'field2Options' => ['attribute' => 'obrKvalifikaciyaNazvanie', 'switchIntroText' => 'Возможно ваша квалификация есть в списке.', 'switchLinkText' => 'Нажмите здесь чтобы найти её в списке.']]);
?>

        <?php 
echo $form->field($model, 'obrDocTip')->widget(Select2::className(), ['data' => TipDokumentaObObrazovanii::namesMap()]);
?>

        <?php 
echo $form->field($model, 'obrDocSeriya');
?>
        <?php 
echo $form->field($model, 'obrDocNomer');
?>
        <?php 
echo $form->field($model, 'obrDocData')->widget(DeprecatedDatePicker::classname());
?>
Example #4
0
 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;
 }
Example #5
0
 public function save()
 {
     $fizLicoFio = FizLico::getFioById($this->fizLicoId);
     $rabota = RabotaFizLica::find()->joinWith('dolzhnostiFizLicaNaRaboteRel')->where(['rabota_fiz_lica.id' => $this->dolzhnost])->one();
     $zayavlenie = ZayavlenieNaAttestaciyu::findOne($this->id ? $this->id : 0);
     $attestaciyaDates = $this->parseAttestaciyaDate();
     if (!$zayavlenie) {
         $zayavlenie = new ZayavlenieNaAttestaciyu();
     }
     $zayavlenie->fiz_lico = $this->fizLicoId;
     $zayavlenie->familiya = $fizLicoFio['familiya'];
     $zayavlenie->imya = $fizLicoFio['imya'];
     $zayavlenie->otchestvo = $fizLicoFio['otchestvo'];
     $zayavlenie->ped_stazh = $this->pedStazh;
     $zayavlenie->stazh_v_dolzhnosti = $this->pedStazhVDolzhnosti;
     $zayavlenie->rabota_organizaciya = $rabota->organizaciya;
     $zayavlenie->rabota_dolzhnost = $rabota->dolzhnostiFizLicaNaRaboteRel[0]->dolzhnost;
     $zayavlenie->rabota_stazh_v_dolzhnosti = $this->rabotaPedStazhVDolzhnosti;
     $zayavlenie->rabota_kopiya_trudovoj_knizhki = $this->trudovajya;
     $zayavlenie->attestaciya_kategoriya = $this->attestacionnyListKategoriya;
     $zayavlenie->attestaciya_kopiya_attestacionnogo_lista = $this->attestacionnyListPeriodFajl;
     $zayavlenie->attestaciya_data_prisvoeniya = date('Y-m-d', strtotime($attestaciyaDates['data_prisvoeniya']));
     $zayavlenie->attestaciya_data_okonchaniya_dejstviya = date('Y-m-d', strtotime($attestaciyaDates['data_okonchaniya_dejstviya']));
     $zayavlenie->na_kategoriyu = $this->kategoriya;
     $zayavlenie->attestaciya_data_okonchaniya_dejstviya = date('Y-m-d', strtotime($this->attestaciyaDataOkonchaniyaDejstviya));
     $zayavlenie->rabota_data_naznacheniya = date('Y-m-d', strtotime($this->rabotaDataNaznacheniya));
     $zayavlenie->rabota_data_naznacheniya_v_uchrezhdenii = date('Y-m-d', strtotime($this->rabotaDataNaznacheniyaVUchrezhdenii));
     $zayavlenie->data_rozhdeniya = date('Y-m-d', strtotime($this->dataRozhdeniya));
     if ($this->kategoriya == KategoriyaPedRabotnika::VYSSHAYA_KATEGORIYA) {
         $zayavlenie->svedeniya_o_sebe = $this->svedeniysOSebe ? $this->svedeniysOSebe : null;
         $zayavlenie->svedeniya_o_sebe_fajl = $this->svedeniysOSebeFajl;
     } else {
         $zayavlenie->svedeniya_o_sebe = null;
         $zayavlenie->svedeniya_o_sebe_fajl = null;
     }
     if ($this->kategoriya == KategoriyaPedRabotnika::BEZ_KATEGORII) {
         $zayavlenie->var_ispytanie_2 = null;
         $zayavlenie->var_ispytanie_3 = null;
     } else {
         $zayavlenie->var_ispytanie_2 = $this->kategoriya == KategoriyaPedRabotnika::VYSSHAYA_KATEGORIYA ? $this->varIspytanie2 : null;
         $zayavlenie->var_ispytanie_3 = $this->kategoriya == KategoriyaPedRabotnika::VYSSHAYA_KATEGORIYA ? $this->varIspytanie3 : null;
         if (count($this->otraslevoeSoglashenie) > 0) {
             $zayavlenie->var_ispytanie_3 = null;
         }
     }
     $zayavlenie->vremya_provedeniya = $this->vremyaProvedeniya;
     $this->status = $this->status ? $this->status : StatusZayavleniyaNaAttestaciyu::REDAKTIRUETSYA_PED_RABOTNIKOM;
     $zayavlenie->status = $this->status ? $this->status : StatusZayavleniyaNaAttestaciyu::REDAKTIRUETSYA_PED_RABOTNIKOM;
     $zayavlenie->vremya_smeny_statusa = date("Y-m-d H:i:s");
     $zayavlenie->domashnijTelefon = substr($this->domashnijTelefon, 1);
     $zayavlenie->provestiZasedanieBezPrisutstviya = $this->provestiZasedanieBezPrisutstviya;
     $zayavlenie->prilozhenie1 = $this->prilozhenie1;
     $zayavlenie->ld_olimpiady = $this->ldOlimpiady ? $this->ldOlimpiady : null;
     $zayavlenie->ld_posobiya = $this->ldPosobiya ? $this->ldPosobiya : null;
     $zayavlenie->ld_publikacii = $this->ldPublikacii ? $this->ldPublikacii : null;
     $zayavlenie->ld_prof_konkursy = $this->ldProfKonkursy ? $this->ldProfKonkursy : null;
     $zayavlenie->ld_obshestvennaya_aktivnost = $this->ldObshestvennayaAktivnost ? $this->ldObshestvennayaAktivnost : null;
     $zayavlenie->ld_elektronnye_resursy = $this->ldElektronnyeResursy ? $this->ldElektronnyeResursy : null;
     $zayavlenie->ld_otkrytoe_meropriyatie = $this->ldOtkrytoeMeropriyatie ? $this->ldOtkrytoeMeropriyatie : null;
     $zayavlenie->ld_nastavnik = $this->ldNastavnik ? $this->ldNastavnik : null;
     $zayavlenie->ld_deti_sns = $this->ldDetiSns ? $this->ldDetiSns : null;
     if (!$zayavlenie->validate()) {
         return false;
     }
     //создаем массив с высшими образованиями
     $Obrazovaniya = [];
     if ($this->visshieObrazovaniya) {
         foreach ($this->visshieObrazovaniya as $k => $v) {
             $object = ['tip' => 'vo', 'index' => $k];
             if ($v->udalit) {
                 $object['udalit'] = 1;
             } else {
                 $object['udalit'] = 0;
             }
             $dataVidachi = date('Y-m-d', strtotime($v->dataVidachi));
             $obrazovanieFizLica = ObrazovanieFizLica::findOne($v->obrazovanieFizLicaId ? $v->obrazovanieFizLicaId : 0);
             if (!$obrazovanieFizLica) {
                 $obrazovanieFizLica = new ObrazovanieFizLica();
             }
             $obrazovanieFizLica->fiz_lico = $this->fizLicoId;
             $obrazovanieFizLica->dokument_ob_obrazovanii_tip = $v->tipDokumenta;
             $obrazovanieFizLica->dokument_ob_obrazovanii_seriya = $v->seriya;
             $obrazovanieFizLica->dokument_ob_obrazovanii_nomer = $v->nomer;
             $obrazovanieFizLica->dokument_ob_obrazovanii_data = $dataVidachi;
             $obrazovanieFizLica->kvalifikaciya = $v->kvalifikaciyaId;
             $obrazovanieFizLica->organizaciya = $v->organizaciyaId;
             if (!$v->kvalifikaciyaId and $v->kvalifikaciyaNazvanie) {
                 $object['novayaKvalifikaciya'] = $v->kvalifikaciyaNazvanie;
             } else {
                 $object['novayaKvalifikaciya'] = '';
             }
             if (!$v->organizaciyaId and $v->organizaciyaNazvanie) {
                 $object['novayaOrganizaciya'] = $v->organizaciyaNazvanie;
             } else {
                 $object['novayaOrganizaciya'] = '';
             }
             $obrazovanieFizLica->dokument_ob_obrazovanii_kopiya = $v->documentKopiya;
             if (!$obrazovanieFizLica->validate()) {
                 return false;
             }
             $object['obrazovanieFizLica'] = $obrazovanieFizLica;
             $obrazovanieDlyaZayavleniya = ObrazovanieDlyaZayavleniyaNaAttestaciyu::findOne($v->obrazovanieDlyaZayavleniyaId ? $v->obrazovanieDlyaZayavleniyaId : 0);
             if (!$obrazovanieDlyaZayavleniya) {
                 $obrazovanieDlyaZayavleniya = new ObrazovanieDlyaZayavleniyaNaAttestaciyu();
             }
             $obrazovanieDlyaZayavleniya->zayavlenie_na_attestaciyu = $this->id;
             $obrazovanieDlyaZayavleniya->obrazovanie_istochnik = $v->obrazovanieFizLicaId;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_tip = $v->tipDokumenta;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_seriya = $v->seriya;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_nomer = $v->nomer;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_data = $dataVidachi;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_kopiya = $v->documentKopiya;
             $obrazovanieDlyaZayavleniya->kvalifikaciya = $v->kvalifikaciyaId;
             $obrazovanieDlyaZayavleniya->organizaciya = $v->organizaciyaId;
             $object['obrazovanieDlyaZayavlaniya'] = $obrazovanieDlyaZayavleniya;
             $Obrazovaniya[] = $object;
         }
     }
     if ($this->kursy) {
         foreach ($this->kursy as $k => $v) {
             $object = ['tip' => 'kurs', 'index' => $k];
             if ($v->udalit) {
                 $object['udalit'] = 1;
             } else {
                 $object['udalit'] = 0;
             }
             $dataVidachi = date('Y-m-d', strtotime($v->dataVidachi));
             $obrazovanieFizLica = ObrazovanieFizLica::findOne($v->obrazovanieFizLicaId ? $v->obrazovanieFizLicaId : 0);
             if (!$obrazovanieFizLica) {
                 $obrazovanieFizLica = new ObrazovanieFizLica();
             }
             $obrazovanieFizLica->fiz_lico = $this->fizLicoId;
             $obrazovanieFizLica->dokument_ob_obrazovanii_tip = $v->tipDokumenta;
             $obrazovanieFizLica->dokument_ob_obrazovanii_data = $dataVidachi;
             $obrazovanieFizLica->organizaciya = $v->organizaciyaId;
             $obrazovanieFizLica->kurs_nazvanie = $v->kursNazvanie;
             $obrazovanieFizLica->kurs_chasy = $v->kursChasy;
             $obrazovanieFizLica->kurs_tip = $v->kursTip;
             $obrazovanieFizLica->dokument_ob_obrazovanii_kopiya = $v->documentKopiya;
             $obrazovanieFizLica->dokument_ob_obrazovanii_seriya = null;
             $obrazovanieFizLica->dokument_ob_obrazovanii_nomer = null;
             if (!$v->organizaciyaId and $v->organizaciyaNazvanie) {
                 $object['novayaOrganizaciya'] = $v->organizaciyaNazvanie;
             } else {
                 $object['novayaOrganizaciya'] = '';
             }
             $object['novayaKvalifikaciya'] = '';
             if (!$obrazovanieFizLica->validate()) {
                 return false;
             }
             $object['obrazovanieFizLica'] = $obrazovanieFizLica;
             $obrazovanieDlyaZayavleniya = ObrazovanieDlyaZayavleniyaNaAttestaciyu::findOne($v->obrazovanieDlyaZayavleniyaId ? $v->obrazovanieDlyaZayavleniyaId : 0);
             if (!$obrazovanieDlyaZayavleniya) {
                 $obrazovanieDlyaZayavleniya = new ObrazovanieDlyaZayavleniyaNaAttestaciyu();
             }
             $obrazovanieDlyaZayavleniya->zayavlenie_na_attestaciyu = $this->id;
             $obrazovanieDlyaZayavleniya->obrazovanie_istochnik = $v->obrazovanieFizLicaId;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_tip = $v->tipDokumenta;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_data = $dataVidachi;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_kopiya = $v->documentKopiya;
             $obrazovanieDlyaZayavleniya->organizaciya = $v->organizaciyaId;
             $obrazovanieDlyaZayavleniya->kurs_nazvanie = $v->kursNazvanie;
             $obrazovanieDlyaZayavleniya->kurs_chasy = $v->kursChasy;
             $obrazovanieDlyaZayavleniya->kurs_tip = $v->kursTip;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_nomer = null;
             $obrazovanieDlyaZayavleniya->dokument_ob_obrazovanii_seriya = null;
             $object['obrazovanieDlyaZayavlaniya'] = $obrazovanieDlyaZayavleniya;
             $Obrazovaniya[] = $object;
         }
     }
     $saveTransaction = RabotaFizLica::getDb()->transaction(function () use($zayavlenie, $Obrazovaniya) {
         //var_dump($zayavlenie->save(false));
         if (!$zayavlenie->save(false)) {
             var_dump('zayavl_error');
             return false;
         }
         $this->id = $zayavlenie->id;
         foreach ($Obrazovaniya as $k => $v) {
             if ($v['udalit']) {
                 if (!$v['obrazovanieDlyaZayavlaniya']->delete()) {
                     return false;
                 }
                 if ($v['tip'] == 'kurs') {
                     if (!$v['obrazovanieFizLica']->delete()) {
                         return false;
                     }
                 }
                 if ($v['tip'] == 'vo') {
                     unset($this->visshieObrazovaniya[$v['index']]);
                 } else {
                     unset($this->kursy[$v['index']]);
                 }
             } else {
                 if ($v['novayaKvalifikaciya']) {
                     $kvalifikaciya = new Kvalifikaciya(['nazvanie' => $v['novayaKvalifikaciya'], 'obschij' => false]);
                     if (!$kvalifikaciya->save(false)) {
                         var_dump('kvalifik_error');
                         return false;
                     }
                     $v['obrazovanieFizLica']->kvalifikaciya = $kvalifikaciya->id;
                     $v['obrazovanieDlyaZayavlaniya']->kvalifikaciya = $kvalifikaciya->id;
                 }
                 if ($v['novayaOrganizaciya']) {
                     $organizaciya = new Organizaciya(['nazvanie' => $v['novayaOrganizaciya'], 'obschij' => false, 'etapy_obrazovaniya' => '{' . \app\enums\EtapObrazovaniya::VYSSHEE_PROFESSIONALNOE_OBRAZOVANIE . '}']);
                     if (!$organizaciya->save(false)) {
                         var_dump('orghanizac_error');
                         return false;
                     }
                     $v['obrazovanieFizLica']->organizaciya = $organizaciya->id;
                     $v['obrazovanieDlyaZayavlaniya']->organizaciya = $organizaciya->id;
                 }
                 if (!$v['obrazovanieFizLica']->validate()) {
                     return false;
                 }
                 if (!$v['obrazovanieFizLica']->save(false)) {
                     var_dump('obrfl_error');
                     return false;
                 }
                 if ($v['tip'] == 'vo') {
                     $this->visshieObrazovaniya[$v['index']]->obrazovanieFizLicaId = $v['obrazovanieFizLica']->id;
                 } else {
                     $this->kursy[$v['index']]->obrazovanieFizLicaId = $v['obrazovanieFizLica']->id;
                 }
                 $v['obrazovanieDlyaZayavlaniya']->obrazovanie_istochnik = $v['obrazovanieFizLica']->id;
                 $v['obrazovanieDlyaZayavlaniya']->zayavlenie_na_attestaciyu = $zayavlenie->id;
                 if (!$v['obrazovanieDlyaZayavlaniya']->validate()) {
                     return false;
                 }
                 if (!$v['obrazovanieDlyaZayavlaniya']->save(false)) {
                     var_dump('obrzZayavl_error');
                     return false;
                 }
                 if ($v['tip'] == 'vo') {
                     $this->visshieObrazovaniya[$v['index']]->obrazovanieDlyaZayavleniyaId = $v['obrazovanieDlyaZayavlaniya']->id;
                 } else {
                     $this->kursy[$v['index']]->obrazovanieDlyaZayavleniyaId = $v['obrazovanieDlyaZayavlaniya']->id;
                 }
             }
         }
         foreach ($this->otraslevoeSoglashenie as $key => $item) {
             /**
              * @var OtraslevoeSoglashenie $item
              */
             $item->zayavlenieNaAttestaciyu = $this->id;
             if ($savedItem = $item->save()) {
                 if ($item->udalit) {
                     unset($this->otraslevoeSoglashenie[$key]);
                 } else {
                     $item->id = $savedItem->id;
                 }
             } else {
                 var_dump('os_error');
                 return false;
             }
         }
         return true;
     });
     if (!$saveTransaction) {
         return false;
     }
     return true;
 }
Example #6
0
use app\widgets\Select3;
echo '<div class="panel panel-default">';
echo '<div class="panel-heading clearfix" id="panel' . $num . '">' . '<div>' . ((!isset($registraciya) or !$registraciya->status || $registraciya->status == \app\enums\StatusZayavleniyaNaAttestaciyu::REDAKTIRUETSYA_PED_RABOTNIKOM || $registraciya->status == \app\enums\StatusZayavleniyaNaAttestaciyu::OTKLONENO) ? '<button type="button" onclick="deletVO(\'' . $model->obrazovanieDlyaZayavleniyaId . '\',this)" class="btn btn-default pull-right"><i class="glyphicon glyphicon-trash"></i> Удалить</button>' : '') . '</div>' . '</div>';
echo '<div class="panel-body">';
echo '<div class="col-md-4 no-left-padding ' . (($model->hasErrors('organizaciyaId') or $model->hasErrors('organizaciyaNazvanie')) ? 'has-error' : '') . '">';
echo Html::activeHiddenInput($model, "[{$num}]obrazovanieFizLicaId");
echo Html::activeHiddenInput($model, "[{$num}]obrazovanieDlyaZayavleniyaId");
echo Select3::widget(['model' => $model, 'attribute' => "[{$num}]organizaciyaId", 'secondAttribute' => "[{$num}]organizaciyaNazvanie", 'data' => Organizaciya::getVpOrganizaciiWithForFizLico(\app\globals\ApiGlobals::getFizLicoPolzovatelyaId())->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'), 'placeholder' => 'Выберите организацию', 'secondPlaceholder' => 'Введите наименование организации']);
echo '</div>';
echo '<div class="col-md-4 ' . ($model->hasErrors('tipDokumenta') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, "[{$num}]tipDokumenta");
echo Html::activeDropDownList($model, "[{$num}]tipDokumenta", TipDokumentaObObrazovanii::namesMap(), ['class' => 'form-control']);
echo Html::tag('div', $model->getFirstError('tipDokumenta'), ['class' => 'help-block']);
echo '</div>';
echo '<div class="col-md-4 no-right-padding ' . (($model->hasErrors('kvalifikaciyaId') or $model->hasErrors('kvalifikaciyaNazvanie')) ? 'has-error' : '') . '">';
echo Select3::widget(['model' => $model, 'attribute' => "[{$num}]kvalifikaciyaId", 'secondAttribute' => "[{$num}]kvalifikaciyaNazvanie", 'data' => Kvalifikaciya::find()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie'), 'placeholder' => 'Выберите квалификацию', 'secondPlaceholder' => 'Введите наименование квалификации']);
echo '</div>';
echo '<div class="col-md-3 no-left-padding field-seriya ' . ($model->hasErrors('seriya') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, "[{$num}]seriya");
echo Html::activeTextInput($model, "[{$num}]seriya", ['class' => 'form-control', 'placeholder' => '']);
echo Html::tag('div', $model->getFirstError('seriya'), ['class' => 'help-block']);
echo '</div>';
echo '<div class="col-md-3 ' . ($model->hasErrors('nomer') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, "[{$num}]nomer");
echo Html::activeTextInput($model, "[{$num}]nomer", ['class' => 'form-control']);
echo Html::tag('div', $model->getFirstError('nomer'), ['class' => 'help-block']);
echo '</div>';
echo '<div class="col-md-3 ' . ($model->hasErrors('dataVidachi') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, '[{$num}]dataVidachi');
echo DatePicker::widget(['model' => $model, 'attribute' => "[{$num}]dataVidachi", 'language' => 'ru', 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy'], 'options' => ['placeholder' => 'Выберите дату выдачи']]);
echo Html::tag('div', $model->getFirstError('dataVidachi'), ['class' => 'help-block']);
Example #7
0
 public function actionAddVisheeObrazovanie()
 {
     $num = isset($_POST['num']) ? $_POST['num'] : '0';
     $model = new VissheeObrazovanie();
     $organizacii = Organizaciya::getVpOrganizaciiWithForFizLico(\app\globals\ApiGlobals::getFizLicoPolzovatelyaId())->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie');
     $kvalifikaciya = Kvalifikaciya::find()->formattedAll(EntityQuery::DROP_DOWN, 'nazvanie');
     return json_encode($this->renderAjax('vissheeObrazovanie', compact('model', 'num', 'organizacii', 'kvalifikaciya')));
 }