Advertisement
Guest User

generate.php

a guest
Aug 31st, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.73 KB | None | 0 0
  1. <?php
  2. $this->breadcrumbs = array(
  3.     'Curriculum'=>array('index'),
  4.     'Generate',
  5. );
  6. ?>
  7.  
  8. <h1>Tambah Kurikulum</h1>
  9.  
  10. <?php
  11. $properties = array(
  12.     'id'=>'picket-form',
  13.     'enableAjaxValidation'=>false,
  14.     'type'=>'horizontal',
  15.     'htmlOptions'=>array('class'=>'well'),
  16.     'focus'=>array($model, 'FacultyId'),
  17. );
  18. $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', $properties);
  19.  
  20. echo $form->errorSummary($model);
  21.  
  22. $htmlOptions = array('class'=>'span2');
  23. $yearList = $course->yearList->list;
  24. echo $form->dropDownListRow($model, 'year', $yearList, $htmlOptions);
  25.  
  26. $semesterList = $course->semesterList->list;
  27. $htmlOptions = array('class'=>'span2');
  28. echo $form->dropDownListRow($model, 'semester', $semesterList, $htmlOptions);
  29.  
  30. $majorList = Major::ListData();
  31. $htmlOptions = array('class'=>'span5', 'empty'=>'');
  32. echo $form->dropDownListRow($model, 'majorId', $majorList, $htmlOptions);
  33. ?>
  34.  
  35. <div class="form-actions">
  36.     <?php
  37.     $properties = array(
  38.         'buttonType'=>'submit',
  39.         'size'=>'large',
  40.         'icon'=>'arrow-curve',
  41.         'label'=>'View',
  42.         'htmlOptions'=>array(
  43.             'style'=>'margin-right: 5px;',
  44.             'name'=>'view',
  45.         ),
  46.     );
  47.     $this->widget('bootstrap.widgets.TbButton', $properties);
  48.     ?>
  49. </div>
  50.  
  51. <?php $this->endWidget(); ?>
  52.  
  53. <?php if ($courses || $generalCourses) : ?>
  54.  
  55.     <?php
  56.     Yii::app()->clientScript->registerCoreScript('jquery.ui');
  57.  
  58.     $properties = array(
  59.         'id'=>'curriculum-form',
  60.         'enableAjaxValidation'=>false,
  61.         'type'=>'horizontal',
  62.         'htmlOptions'=>array('class'=>'well'),
  63.     );
  64.     $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', $properties);
  65.     ?>
  66.  
  67.     <p class="help-block">
  68.         Fields with <span class="required">*</span> are required.
  69.     </p>
  70.  
  71.     <?php
  72.    
  73.     $list = array();
  74.    
  75.    
  76.     foreach($generalCourses as $course){
  77.         $list[$course->id] = $course->fullname;
  78.     }
  79.    
  80.     foreach($courses as $course){
  81.         $list[$course->id] = $course->fullname;
  82.     }
  83.    
  84.     echo $form->checkBoxListRow($course, 'id', $list);
  85.    
  86.     echo $form->hiddenField($model, 'year');
  87.     echo $form->hiddenField($model, 'semester');
  88.     echo $form->hiddenField($model, 'majorId');
  89.     ?>    
  90.  
  91.     <div class="form-actions">
  92.         <?php
  93.         $properties = array(
  94.             'buttonType'=>'submit',
  95.             'type'=>'primary',
  96.             'label'=>'Save',
  97.             'htmlOptions'=>array(
  98.                 'style'=>'margin-right: 5px;',
  99.                 'name'=>'add',
  100.             ),
  101.         );
  102.         $this->widget('bootstrap.widgets.TbButton', $properties);
  103.         ?>
  104.     </div>
  105.  
  106.     <?php $this->endWidget(); ?>
  107. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement