Changeset 408

Show
Ignore:
Timestamp:
04/16/08 17:39:28 (9 months ago)
Author:
aarkerio
Message:

Updates on polls

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/polls/admin_edit.ctp

    r268 r408  
    11<div class="image-info"> 
    2 <?php echo $html->formTag('/admin/polls/edit/', 'post'); ?> 
     2<?php echo $form->create('Poll'); ?> 
    33<fieldset> 
    4 <legend>Edit Poll:</legend> 
     4<legend>Edit Poll</legend> 
    55 
    66<?php 
    7     echo $html->hidden('Poll/id'); 
    8     echo $form->labelTag('Poll/question', 'Question:') . "<br />"; 
    9     echo $html->input('Poll/question', array('size'=>60, 'maxlength'=>90)); 
    10     echo $html->tagErrorMsg('Poll/question','Please enter a comment.');  
     7    echo $form->hidden('Poll.id'); 
     8    echo $form->input('Poll.question', array('size'=>60, 'maxlength'=>90));  
    119?> 
    1210<br /> 
    1311<br /> 
    14 <?php echo $form->labelTag('Poll/question', 'Answers:') . "<br />"; ?> 
     12<?php echo $form->label('Poll.question', 'Answers:') . '<br />'; ?> 
    1513 
    1614<?php  
    1715//print_r($this->data); 
    1816 
    19 foreach ($this->data["Pollrow"] as $val) { 
     17foreach ($this->data['Pollrow'] as $val)  
     18{ 
    2019  //echo $val["answer"] . "<br />"; 
    21   echo $html->input('Poll/answer', array("size"=>"60", "maxlength"=>"90", "value"=>$val["answer"])); 
     20  echo $form->input('Poll.answer', array('size'=>60, 'maxlength'=>90, 'value'=>$val['answer'])); 
    2221} 
    2322 
    2423?> 
     24<br /> 
     25<?php  
     26  echo $form->label('Poll.status', 'Enabled:') . '<br />';  
     27  echo $form->checkbox('Poll.status', array('value'=>1));  
     28?> 
     29<br /><br /> 
     30<p style="clear:both"></p></fieldset> 
    2531 
    26 <br /><br /> 
    27 <?php echo $form->labelTag('Poll/status', 'status:') . "<br />"; ?> 
    28 <?php echo $html->checkbox('Poll/status'); ?> 
    29 <br /><br /> 
    30 <p style="clear:both"></p> 
    31 <?php echo $html->submit('Update poll'); ?> 
    32 </fieldset> 
    33 </form> 
     32<?php echo $form->end('Update poll'); ?> 
     33 
    3434</div> 
    3535