--- modules/poll/poll.module +++ modules/poll/poll.module @@ -309,16 +309,16 @@ '#parents' => array('choice', $delta, 'chtext'), ); - if ($admin) { - $form['chvotes'] = array( - '#type' => 'textfield', - '#title' => t('Votes for choice @n', array('@n' => ($delta + 1))), - '#default_value' => $votes, - '#size' => 5, - '#maxlength' => 7, - '#parents' => array('choice', $delta, 'chvotes'), - ); - } + $form['chvotes'] = array( + '#type' => 'textfield', + '#title' => t('Votes for choice @n', array('@n' => ($delta + 1))), + '#value' => ($admin ? NULL : $votes), + '#default_value' => $votes, + '#disabled' => !$admin, + '#size' => 5, + '#maxlength' => 7, + '#parents' => array('choice', $delta, 'chvotes'), + ); return $form; }