diff options
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/poll.module b/modules/poll.module index 9ca9a4787..905f22eed 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -130,7 +130,7 @@ function poll_validate($node) { function poll_form(&$node) { $admin = user_access('administer nodes'); - $form['title'] = array('#type' => 'textfield', '#title' => t('Question'), '#size' => 60, '#maxlength' => 128, '#required' => TRUE, '#default_value' => $node->title, '#weight' => -1); + $form['title'] = array('#type' => 'textfield', '#title' => t('Question'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -1); if (!isset($node->choices)) { $node->choices = max(2, count($node->choice) ? count($node->choice) : 5); @@ -145,13 +145,13 @@ function poll_form(&$node) { $opts = drupal_map_assoc(range(2, $node->choices * 2 + 5)); $form['choice'] = array('#type' => 'fieldset', '#title' => t('Choices'), '#prefix' => '<div class="poll-form">', '#suffix' => '</div>', '#tree' => TRUE); for ($a = 0; $a < $node->choices; $a++) { - $form['choice'][$a]['chtext'] = array('#type' => 'textfield', '#title' => t('Choice %n', array('%n' => ($a + 1))), '#default_value' => $node->choice[$a]['chtext'], '#size' => 60, '#maxlength' => 127); + $form['choice'][$a]['chtext'] = array('#type' => 'textfield', '#title' => t('Choice %n', array('%n' => ($a + 1))), '#default_value' => $node->choice[$a]['chtext']); if ($admin) { $form['choice'][$a]['chvotes'] = array('#type' => 'textfield', '#title' => t('Votes for choice %n', array('%n' => ($a + 1))), '#default_value' => (int)$node->choice[$a]['chvotes'], '#size' => 5, '#maxlength' => 7); } } $form['choices'] = array('#type' => 'hidden', '#value' => $node->choices); - $form['morechoices'] = array('#type' => 'checkbox', '#title' => t('Need more choices'), '#return_value' => 1, '#default_value' => 0, '#description' => t("If the amount of boxes above isn't enough, check this box and click the Preview button below to add some more.")); + $form['morechoices'] = array('#type' => 'checkbox', '#title' => t('Need more choices'), '#default_value' => 0, '#description' => t("If the amount of boxes above isn't enough, check this box and click the Preview button below to add some more.")); // Poll attributes $_duration = array(0 => t('Unlimited')) + drupal_map_assoc(array(86400, 172800, 345600, 604800, 1209600, 2419200, 4838400, 9676800, 31536000), "format_interval"); |