Show
Ignore:
Timestamp:
02/29/08 13:57:50 (10 months ago)
Author:
aarkerio
Message:

Fixed poll and admin routes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/elements/poll.ctp

    r274 r291  
    77<div id="add_pollrow"> 
    88 
    9   <?php 
     9 <?php 
    1010  $poll = $session->read('poll'); 
    1111   
    12   if ( $poll != null &&  $Element["Poll"]['Poll']['id'] == $poll) // the user has not voted 
     12  if ( $poll != null &&  $Element["Poll"]['Poll']['id'] == $poll) // the user has already voted, show poll results 
    1313  { 
    14          
    1514    $total_votes = 0; 
    1615     
     
    4039    echo '<p class="negrita">Total votes:' . $total_votes . '</p>';  
    4140  } 
    42   else // the user has voted, just print the poll result 
     41  else // the user has no voted, print the form 
    4342  { 
    4443    echo $ajax->form(); 
     
    4847    echo "<p><b>" . $Element["Poll"]['Poll']['question'] ."</b></p>"; 
    4948     
    50     echo $form->hidden('Pollrow.poll_id', $Element["Poll"]['Poll']['id']);  // Poll_id 
     49    echo $form->hidden('Pollrow.poll_id', array("value"=>$Element["Poll"]['Poll']['id']));  // Poll_id 
    5150     
    5251    foreach ($Element["Poll"]['Pollrow'] as $key=>$val)