public static function DropDown()
 {
     $res = array();
     foreach (Personbasespeciality::model()->findAll() as $record) {
         $res[$record->idPersonBaseSpeciality] = "({$record->PersonBaseSpecialityClasifierCode}) {$record->PersonBaseSpecialityName}";
     }
     return $res;
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Personbasespeciality::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#3
0
 public function docTypeValid($attribute, $params)
 {
     //11	Диплом бакалавра	1
     //12	Диплом спеціаліста	1
     //13	Диплом магістра	1
     if ($this->PersonBaseSpecealityID > 0) {
         $bs = Personbasespeciality::model()->findByPk($this->PersonBaseSpecealityID);
         $pos = 0;
         if ($this->TypeID == 11) {
             $pos = strpos($bs->PersonBaseSpecialityClasifierCode, "6.");
         }
         if ($this->TypeID == 12) {
             $pos = strpos($bs->PersonBaseSpecialityClasifierCode, "7.");
         }
         if ($this->TypeID == 13) {
             $pos = strpos($bs->PersonBaseSpecialityClasifierCode, "8.");
         }
         if ($pos === false && $pos >= 0) {
             $this->addError($attribute, "Невірний базовий напрям!");
         }
     }
 }
示例#4
0
 public function actionBasespecs()
 {
     $models = Personbasespeciality::model()->findAll('1 ORDER BY PersonBaseSpecialityName');
     $result = array();
     foreach ($models as $model) {
         /* @var $model Personbasespeciality */
         $result[] = array('text' => str_replace('"', "'", implode(' ', array($model->PersonBaseSpecialityClasifierCode, $model->PersonBaseSpecialityName))), 'id' => $model->idPersonBaseSpeciality);
     }
     echo CJSON::encode($result);
 }
示例#5
0
echo $form->labelEx($model, 'isPublishIn');
?>
            <div class="switch" data-on-label="Так" data-off-label="Ні">
                <?php 
echo $form->checkBox($model, 'isPublishIn');
?>
            </div> 
        </div>   
    </div>
      <hr/>
    <div class="row-fluid">
        <?php 
echo $form->labelEx($model, 'basespecialitys');
?>
        <?php 
echo $form->dropDownList($model, 'basespecialitys', Personbasespeciality::DropDown(), array('empty' => "", 'style' => "width: 100%;", "multiple" => "multiple"));
?>
    </div>
     <?php 
//------------------------------------------------------------------------------------------------------------------------------------//
?>
    <hr/>
    <div class="row-fluid">   	
        <div class ="span4">
            <?php 
echo $form->labelEx($model, 'Quota2');
?>
            <?php 
echo $form->textField($model, 'Quota2', array('class' => 'span12', 'size' => 12));
?>
            <?php 
示例#6
0
echo $form->labelEx($model, 'isNotCheckAttestat');
?>
            <div class="switch" data-on-label="Так" data-off-label="Ні">
                <?php 
echo $form->checkBox($model, 'isNotCheckAttestat');
?>
            </div>
        </div>
    </div>
    <div class="row-fluid" >
        <div class ="span6" style="margin-top: 4px;">
            <?php 
echo $form->labelEx($model, 'PersonBaseSpecealityID');
?>
            <?php 
echo $form->dropDownList($model, 'PersonBaseSpecealityID', Personbasespeciality::DropDown(), array('empty' => "", 'class' => 'span12'));
?>
        </div>   
        <div class="span3">
            <?php 
echo $form->labelEx($model, 'PersonDocumentsAwardsTypesID');
?>
            <?php 
echo $form->dropDownList($model, 'PersonDocumentsAwardsTypesID', CHtml::listData(Persondocumentsawardstypes::model()->findAll(), 'idPersonDocumentsAwardsTypes', 'PersonDocumentsAwardsTypesName'), array('empty' => '', 'class' => 'span12', 'style' => "width: 100%;"));
?>
        </div>
    </div>

    <p class="help-block"><strong>Попередня освіта</strong></p>
    <hr>   
    <div class="row-fluid" >