| 6 | | echo $html->formTag('/admin/questions/edit','post', array("onsubmit"=>"return validateNew()")); |
| 7 | | echo $html->hidden('Question/test_id'); |
| | 2 | echo $html->addCrumb('Control Tools', '/admin/entries/start'); |
| | 3 | echo $html->addCrumb('Test', '/admin/tests/listing'); |
| | 4 | echo $html->getCrumbs(' / '); |
| | 5 | |
| | 6 | echo $form->create('Question', array("onsubmit"=>"return validateNew()")); |
| | 7 | echo $form->hidden('Question.id'); |
| | 8 | echo $form->hidden('Question.test_id', array('value'=>$this->data['Question']['test_id'])); |
| 11 | | <div class="required"> |
| 12 | | <?php |
| 13 | | echo $form->labelTag('Question/question', 'Question:' ); |
| 14 | | echo $html->input('Question/question', array("size" => 40, "maxlength" => 120)); |
| 15 | | echo $html->tagErrorMsg('Question/question', 'Question is required.'); |
| 16 | | ?> |
| 17 | | </div> |
| | 12 | <?php |
| | 13 | echo $html->div('required',$form->input('Question.question', array("size" => 40, "maxlength" => 120))); |
| | 14 | |
| | 15 | echo $html->div('required',$form->input('Question.hint', array("size" => 40, "maxlength" => 120))); |
| | 16 | |
| | 17 | $tmp = $form->label('Question.explanation', 'Explanation:'); |
| | 18 | $tmp .= $form->textarea('Question.explanation', array("cols" => 50, "rows" => 5)); |
| 19 | | <div class="required"> |
| 20 | | <?php |
| 21 | | echo $form->labelTag('Question/hint', 'Hint:' ); |
| 22 | | echo $html->input('Question/hint', array("size" => 40, "maxlength" => 120)); |
| 23 | | echo $html->tagErrorMsg('Question/hint', 'Hint is required.'); |
| 24 | | ?> |
| 25 | | </div> |
| | 20 | echo $html->div('required',$tmp); |
| | 21 | |
| | 22 | $t = $form->label('Question.worth', 'Worth:'); |
| | 23 | $t .= $form->select('Question.worth', array(1,2,3,4,5,6,7,8,9,10), null, null, false, false); |
| | 24 | echo $html->div('required',$t); |
| | 25 | ?> |
| | 26 | </fieldset> |
| | 27 | <?php echo $form->end('Save'); ?> |
| 27 | | <div class="required"> |
| 28 | | <?php |
| 29 | | echo $form->labelTag('Question/explanation', 'Explanation:' ); |
| 30 | | echo $html->textarea('Question/explanation', array("cols" => 50, "rows" => 5)); |
| 31 | | echo $html->tagErrorMsg('Question/explanation', 'Description is required.'); |
| 32 | | ?> |
| 33 | | </div> |
| 34 | | |
| 35 | | <div class="required"> |
| 36 | | <?php |
| 37 | | echo $form->labelTag( 'Question/status', 'Published:' ); |
| 38 | | $options = array(1,2,3,4,5,6,7,8,9,10); |
| 39 | | echo $html->selectTag('Question/value', $options, null, null, false, false); |
| 40 | | ?> |
| 41 | | </div> |
| 42 | | |
| 43 | | <div> |
| 44 | | <?php echo $html->submit('Save'); ?> </form> |
| 45 | | </div> |
| 46 | | </fieldset> |