public function actionCommitEditKomissii()
 {
     \Yii::$app->response->format = Response::FORMAT_JSON;
     $id = $_REQUEST['id'];
     $new_nazvanie = $_REQUEST['new_nazvanie'];
     $result = [];
     if ($new_nazvanie == '') {
         $result['type'] = 'error';
         $result['msg'] = 'Введите название';
     } else {
         $komissiya = AttestacionnayaKomissiya::findOne($id);
         $komissiya->nazvanie = $new_nazvanie;
         if ($komissiya->validate() && $komissiya->save()) {
             $result['type'] = 'success';
         } else {
             $result['type'] = 'error';
             $result['msg'] = 'Ошибка при сохранении данных, данные не прошли валидацию';
         }
     }
     return $result;
 }
Пример #2
0
    }

STYLE;
$this->registerCss($style);
$roles = Yii::$app->authManager->getRolesByUser(Yii::$app->user->id);
?>

<div ng-app="rukovoditel" ng-controller="RukovoditelKomissiiController as rk">
    <div class="inline-block">

        <div class="inline-block">
            <?php 
if (isset($roles[\app\enums2\Rol::SOTRUDNIK_OTDELA_ATTESTACII])) {
    echo Html::label('Комиссия', 'komissiya', []);
    echo Html::dropDownList('komissiya', null, \app\entities\AttestacionnayaKomissiya::find()->formattedAll(\app\entities\EntityQuery::DROP_DOWN, 'nazvanie'), ['id' => 'komissiya', 'class' => 'form-control inline-block', 'ng-model' => "rk.komissiya"]);
} else {
    //echo Html::input('hidden','komissiya',$komissiyaId,['id' => 'komissiya']);
    echo Html::label('Комиссия', 'komissiya', []);
    echo Html::dropDownList('komissiya', null, \app\helpers\ArrayHelper::map($komissiyaId, 'attestacionnaya_komissiya', 'attestacionnayaKomissiyaRel.nazvanie'), ['id' => 'komissiya', 'class' => 'form-control inline-block', 'ng-model' => "rk.komissiya"]);
}
?>
        </div>

        <div class="inline-block">
            <?php 
echo Html::label('Период прохождения аттестации', 'periods', []);
?>
            <?php 
echo Html::dropDownList('periods', null, $periods_for_dropdown, ['id' => 'periods', 'class' => 'form-control inline-block', 'ng-disabled' => 'rk.allUnfinished']);
?>
Пример #3
0
    <div class="row relative" >
        <div class="col-md-4">
            <?php 
echo Html::label('Период прохождения аттестации', 'periods', []);
?>
            <?php 
echo Html::dropDownList('periods', null, VremyaProvedeniyaAttestacii::getItemsToSelectFromSeptember(), ['ng-model' => 'o.vp', 'id' => 'periods', 'class' => 'form-control inline-block']);
?>
        </div>
        <div class="col-md-4" >
            <?php 
echo Html::label('Период прохождения аттестации', 'komissiya', []);
?>
            <?php 
echo Html::dropDownList('komissiya', null, AttestacionnayaKomissiya::getKomissiiForDropDown(), ['ng-model' => 'o.komissiya', 'id' => 'komissiya', 'class' => 'form-control inline-block']);
?>
        </div>
        <div class="col-md-4" style="position:absolute;bottom:0;right: 0">
            <button class="btn btn-primary" ng-click="o.load()">Загрузить</button>
        </div>
    </div>
    <p>&nbsp;</p>
    <div class="row">

        <div class="col-md-12">
            <table class="tb">
                <thead>
                    <tr class="thead">
                        <td>ФИО</td>
                        <td>Количество</td>