Beispiel #1
0
echo $form->labelEx($model, 'activated_timestamp');
?>
        <?php 
echo $form->textField($model, 'activated_timestamp');
?>
        <?php 
echo $form->error($model, 'activated_timestamp');
?>
    </div>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'coordinator');
?>
        <?php 
echo CustomCHtml::radioButtonSwitch('SchoolMentor[coordinator]', $model->active, array(0 => Yii::t('app', 'no'), 1 => Yii::t('app', 'yes')));
?>
        <?php 
echo $form->error($model, 'coordinator');
?>
    </div>


    <div class="row buttons">
        <br /><?php 
$this->widget('zii.widgets.jui.CJuiButton', array('name' => 'button', 'caption' => $model->isNewRecord ? Yii::t('app', 'create') : Yii::t('app', 'save'), 'value' => $model->isNewRecord ? Yii::t('app', 'create') : Yii::t('app', 'save')));
?>
	</div>

    <?php 
$this->endWidget();
Beispiel #2
0
<div class="wide form">

<?php 
$form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
?>
    
    <?php 
$superuser = User::model()->find('id=:id', array(':id' => Yii::app()->user->id))->superuser;
?>
    
	<div class="row">
		<?php 
echo $form->labelEx($model, 'active');
?>
		<?php 
echo CustomCHtml::radioButtonSwitch('CompetitionCategory[active]', $model->active, array(0 => Yii::t('app', 'no'), 1 => Yii::t('app', 'yes')));
?>
		<?php 
echo $form->error($model, 'active');
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'name');
?>
		<?php 
echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 255));
?>
	</div>
Beispiel #3
0
echo $form->labelEx($model, 'type');
?>
        <?php 
echo CHtml::dropDownList('Competition[type]', $model->type, $model->GetTypeOfCompetition(), array('empty' => Yii::t('app', 'choose')));
?>
        <?php 
echo $form->error($model, 'type');
?>
    </div>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'public_access');
?>
        <?php 
echo CustomCHtml::radioButtonSwitch('Competition[public_access]', $model->public_access, array(2 => Yii::t('app', 'no'), 1 => Yii::t('app', 'yes')));
?>
        <?php 
echo $form->error($model, 'public_access');
?>
    </div>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'duration');
?>
        <?php 
echo $form->textField($model, 'duration');
?>
        <?php 
echo $form->error($model, 'duration');
Beispiel #4
0
?>
            <?php 
echo $form->error($school_mentor, 'school_id');
?>
 
        </div>
    </div>

    <div class="row">
        <div id="coordinator_id">
            <?php 
echo $form->labelEx($school_mentor, 'Do you want to be coordinator?');
?>
<br>
            <?php 
echo CustomCHtml::radioButtonSwitch('SchoolMentor[coordinator]', $school_mentor->coordinator, array(0 => Yii::t('app', 'no'), 1 => Yii::t('app', 'yes')));
echo $form->error($school_mentor, 'coordinator');
?>
        </div>
    </div>


    <div class="buttons">
        <br /><?php 
$this->widget('zii.widgets.jui.CJuiButton', array('name' => 'button', 'caption' => $model->isNewRecord = Yii::t('app', 'Register'), 'value' => $model->isNewRecord = Yii::t('app', 'Register'), 'htmlOptions' => array('style' => 'height: 35px; font-size: 12px; width: 200px')));
?>
    </div>

        <?php 
$this->endWidget();
?>
Beispiel #5
0
            <?php 
echo $form->textField($model, 'class', array('size' => 20, 'maxlength' => 20, 'autocomplete' => 'off', 'style' => 'width: 115px; padding-left: 5px;'));
?>
        </div>
        <div style="clear: both;"></div>
        <?php 
echo $form->error($model, 'class');
?>
    </div>

    <div class="row" style="width: 420px; height: 19px;">
        <?php 
echo $form->labelEx($model, 'gender', array('id' => 'GenderLabel'));
?>
        <?php 
echo CustomCHtml::radioButtonSwitch('CompetitionUser[gender]', $model->gender, array(0 => Yii::t('app', 'Male'), 1 => Yii::t('app', 'Female')), array('labelOptions' => array("style" => "width:50px;")));
?>
        <?php 
echo $form->error($model, 'gender');
?>
    </div>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'access_code');
?>
        <?php 
echo $form->textField($model, 'access_code', array('autocomplete' => 'off'));
?>
        <?php 
echo $form->error($model, 'access_code');
Beispiel #6
0
    echo $form->error($model, 'award');
    ?>
        </div>
        <?php 
}
?>

    <?php 
if (CompetitionUser::canShowAdvancingToNextLevel($model->competition_id)) {
    ?>
        <div class="row">
            <?php 
    echo $form->labelEx($model, 'advancing_to_next_level');
    ?>
            <?php 
    echo CustomCHtml::radioButtonSwitch('CompetitionUser[advancing_to_next_level]', $model->advancing_to_next_level, array(0 => Yii::t('app', 'no'), 1 => Yii::t('app', 'yes')), array('disabled' => $edit_all ? '' : 'disabled'));
    ?>
            <?php 
    echo $form->error($model, 'advancing_to_next_level');
    ?>
        </div>
        <?php 
}
?>

    <?php 
/*
 <div class="row">
 <?php echo $form->labelEx($model, 'total_points_via_answers'); ?>
 <?php echo $form->textField($model, 'total_points_via_answers', array('size' => 10, 'maxlength' => 10)); ?>
 <?php echo $form->error($model, 'total_points_via_answers'); ?>
Beispiel #7
0
            }
        }
    }
    echo CHtml::activeDropDownList($model, 'user_id', $user_list, array('empty' => Yii::t('app', 'choose')));
    ?>
            <?php 
    echo $form->error($model, 'user_id');
    ?>
        </div>

        <div class="row">
            <?php 
    echo $form->labelEx($model, 'disqualified');
    ?>
            <?php 
    echo CustomCHtml::radioButtonSwitch('CompetitionCategorySchoolMentor[disqualified]', $model->disqualified, array(0 => Yii::t('app', 'no'), 1 => Yii::t('app', 'yes')), array('disabled' => $edit_all ? '' : 'disabled'));
    ?>
            <?php 
    echo $form->error($model, 'disqualified');
    ?>
        </div>

        <div class="row">
            <?php 
    echo $form->labelEx($model, 'disqualified_by');
    ?>
            <?php 
    $data = User::model()->with('profile')->findAll(array('condition' => 'profile.user_role>=:user_role', 'params' => array(':user_role' => 10), 'order' => 'profile.last_name ASC, profile.first_name ASC'));
    $user_list = array();
    foreach ($data as $dataUser) {
        $user_list[$dataUser->id] = $dataUser->profile->last_name . ' ' . $dataUser->profile->first_name;