Révision b4adf10d
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/modules/poll/poll.module | ||
---|---|---|
249 | 249 |
'#title' => check_plain($type->title_label), |
250 | 250 |
'#required' => TRUE, |
251 | 251 |
'#default_value' => $node->title, |
252 |
'#maxlength' => 255, |
|
252 | 253 |
'#weight' => -5, |
253 | 254 |
); |
254 | 255 |
|
... | ... | |
720 | 721 |
'#type' => 'radios', |
721 | 722 |
'#title' => t('Choices'), |
722 | 723 |
'#title_display' => 'invisible', |
723 |
'#default_value' => -1, |
|
724 | 724 |
'#options' => $list, |
725 | 725 |
); |
726 | 726 |
} |
... | ... | |
748 | 748 |
* Validation function for processing votes |
749 | 749 |
*/ |
750 | 750 |
function poll_view_voting_validate($form, &$form_state) { |
751 |
if ($form_state['values']['choice'] == -1) {
|
|
751 |
if (empty($form_state['values']['choice'])) {
|
|
752 | 752 |
form_set_error( 'choice', t('Your vote could not be recorded because you did not select any of the choices.')); |
753 | 753 |
} |
754 | 754 |
} |
... | ... | |
925 | 925 |
* |
926 | 926 |
* @see poll-bar.tpl.php |
927 | 927 |
* @see poll-bar--block.tpl.php |
928 |
* @see theme_poll_bar() |
|
929 | 928 |
*/ |
930 | 929 |
function template_preprocess_poll_bar(&$variables) { |
931 | 930 |
if ($variables['block']) { |
Formats disponibles : Unified diff
Udpate to 7.33