コード例 #1
0
ファイル: _form.php プロジェクト: kenrestivo/ossasep
<?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'returned', 'value' => $model->returned, 'options' => array('showAnim' => 'fold', 'showButtonPanel' => true, 'autoSize' => true, 'dateFormat' => 'yy-mm-dd', 'defaultDate' => $model->returned)));
?>
		<?php 
echo $form->error($model, 'returned');
?>
	</div>


	<div class="row">
		<?php 
echo $form->labelEx($model, 'session_id');
?>
    <?php 
// NOTE: DO NOT LET THEM CHANGE THE SESSION!!!
ZHtml::multiEndedDropDown($model, $form, 'session_id', "CHtml::listData(ClassSession::model()->findAll(), \n                        'id', 'summary')", 'CHtml::encode($model->session->summary)');
?>
		<?php 
echo $form->error($model, 'session_id');
?>
	</div>


	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
if ($model->isNewRecord) {
    echo " (You will assign the check to a class and student after creating the check first)";
}
?>
	</div>
コード例 #2
0
ファイル: _form.php プロジェクト: kenrestivo/ossasep
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'requirement-status-form', 'enableAjaxValidation' => false));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'instructor_id');
?>
    <?php 
ZHtml::multiEndedDropDown($model, $form, 'instructor_id', "CHtml::listData(Instructor::model()->findAll(), 'id', 'full_name')", 'CHtml::encode($model->instructor->full_name)');
?>
	<?php 
echo $form->error($model, 'instructor_id');
?>

	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'requirement_type_id');
?>


    <?php 
echo $form->dropDownList($model, 'requirement_type_id', CHtml::listData(RequirementType::model()->findAll(), 'id', 'description'));
コード例 #3
0
ファイル: _form.php プロジェクト: kenrestivo/ossasep
	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>



	<div class="row">
		<?php 
echo $form->labelEx($model, 'student_id');
?>

    <?php 
ZHtml::multiEndedDropDown($model, $form, 'student_id', "CHtml::listData(Student::model()->findAll(), 'id', 'full_name')", 'CHtml::encode($model->student->full_name. " (" . Yii::app()->format->grade($model->student->grade) . ")")', array('class' => 'chzn-select', 'empty' => "Choose One"));
?>
		<?php 
echo $form->error($model, 'student_id');
?>
	</div>



	<div class="row">
		<?php 
echo $form->labelEx($model, 'class_id');
?>

    <?php 
// I cannot use the multiendeddropdown here, because of the odd dropdown
コード例 #4
0
ファイル: _form.php プロジェクト: kenrestivo/ossasep
echo $form->textField($model, 'note', array('size' => 60, 'maxlength' => 256));
?>
		<?php 
echo $form->error($model, 'note');
?>
	</div>



	<div class="row">
		<?php 
echo $form->labelEx($model, 'class_id');
?>

<?php 
ZHtml::multiEndedDropDown($model, $form, 'class_id', "CHtml::listData(ClassInfo::model()->findAll(), \n                        'id', 'summary')", 'CHtml::encode($model->class->summary)');
?>

		<?php 
echo $form->error($model, 'class_id');
?>
	</div>



	<div class="row">
		<?php 
echo $form->labelEx($model, 'makeup');
?>
		<?php 
echo $form->checkbox($model, 'makeup');
コード例 #5
0
ファイル: _form.php プロジェクト: kenrestivo/ossasep
	<div class="row">

		<?php 
echo $form->labelEx($model, 'class_id');
if (isset($model->student_id)) {
    $cdrop = "CHtml::listData(Student::model()->findByPk(" . $model->student_id . ")->classes, 'id', 'summary')";
} else {
    if (isset($model->check_id)) {
        $coid = $model->check->payee_id;
        $cdrop = "CHtml::listData(ClassInfo::model()->findAll('company_id = {$coid}'), 'id', 'summary')";
    } else {
        $cdrop = "CHtml::listData(ClassInfo::model()->findAll(), 'id', 'summary')";
    }
}
ZHtml::multiEndedDropDown($model, $form, 'class_id', $cdrop, 'CHtml::encode($model->class->summary)', array('class' => 'chzn-select', 'empty' => "Choose One", 'ajax' => array('type' => 'POST', 'dataType' => 'json', 'data' => 'js:{id:$("#Income_class_id").val()}', 'url' => CController::createUrl('ClassInfo/json'), 'success' => "function(data){\n                    \$('#Income_amount').val(data['cost_summary']);\n                   }")));
echo $form->error($model, 'class_id');
?>
	</div>


	<div class="row">
		<?php 
echo $form->labelEx($model, 'amount');
?>
    <?php 
echo $form->textField($model, 'amount', array('size' => 19, 'maxlength' => 19));
if (isset($remaining)) {
    echo '  (' . Yii::app()->format->currencyZero($remaining) . ' avail on check )';
}
echo $form->error($model, 'amount');