Example #1
0
 public function actionAwards()
 {
     $models = Persondocumentsawardstypes::model()->findAll('1 ORDER BY PersonDocumentsAwardsTypesName');
     $result = array();
     foreach ($models as $model) {
         /* @var $model Schools */
         $result[] = array('text' => str_replace('"', "'", $model->PersonDocumentsAwardsTypesName), 'id' => $model->idPersonDocumentsAwardsTypes);
     }
     echo CJSON::encode($result);
 }
Example #2
0
echo $form->labelEx($model, 'Numbers');
echo $form->textField($model, 'Numbers', array('class' => 'span12'));
?>
        </div>    
        <div class ="span3">
            <?php 
echo $form->labelEx($model, 'DateGet');
echo $form->textField($model, 'DateGet', array('class' => 'span12 datepicker'));
?>
        </div>
        <div class="span3">
            <?php 
echo $form->labelEx($model, 'PersonDocumentsAwardsTypesID');
?>
            <?php 
echo $form->dropDownList($model, 'PersonDocumentsAwardsTypesID', CHtml::listData(Persondocumentsawardstypes::model()->findAll("idPersonDocumentsAwardsTypes = 3"), 'idPersonDocumentsAwardsTypes', 'PersonDocumentsAwardsTypesName'), array('empty' => '', 'class' => 'span12', 'style' => "width: 100%;"));
?>
        </div>

    </div>
    <div class="row-fluid">
        <div class ="span12">
            <?php 
echo $form->labelEx($model, 'Issued');
echo $form->textArea($model, 'Issued', array('class' => 'span12'));
?>
        </div>
    </div>


    <div class="row-fluid">
Example #3
0
    </div>
    <div class="row-fluid">
        <div class="span3">
            <?php 
    echo $form->labelEx($model, '[entrantdoc]PersonDocumentsAwardsTypesID');
    ?>
            <?php 
    $c = new CDbCriteria();
    if (!($user->syspk->QualificationID == 2 || $user->syspk->QualificationID == 3)) {
        $c->compare("idPersonDocumentsAwardsTypes", "<3");
    } else {
        $c->compare("idPersonDocumentsAwardsTypes", "3");
    }
    ?>
            <?php 
    echo $form->dropDownList($model, '[entrantdoc]PersonDocumentsAwardsTypesID', CHtml::listData(Persondocumentsawardstypes::model()->findAll($c), 'idPersonDocumentsAwardsTypes', 'PersonDocumentsAwardsTypesName'), array('empty' => '', 'class' => 'span12'));
    ?>
        </div>

        <?php 
    if (Yii::app()->user->checkAccess("showForeignDoc")) {
        ?>
            <div class ="span2">
                <?php 
        echo $form->labelEx($model, '[entrantdoc]isForeinghEntrantDocument');
        ?>
                <div class="switch" data-on-label="Так" data-off-label="Ні">
                    <?php 
        echo $form->checkBox($model, '[entrantdoc]isForeinghEntrantDocument');
        ?>
                </div>