diff options
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r-- | modules/poll/poll.module | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 6ee82c457..be57aa443 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -25,8 +25,6 @@ function poll_help($section) { return $output; case 'admin/settings/modules#description': return t("Allows your site to capture votes on different topics in the form of multiple choice questions."); - case 'node/add#poll': - return t("A poll is a multiple-choice question which visitors can vote on."); } } @@ -128,8 +126,9 @@ function poll_validate($node) { */ function poll_form(&$node) { $admin = user_access('administer nodes'); + $type = node_get_types('type', $node); - $form['title'] = array('#type' => 'textfield', '#title' => t('Question'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -1); + $form['title'] = array('#type' => 'textfield', '#title' => check_plain($type->title_label), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -1); $form['choice']['choices'] = array('#type' => 'hidden', '#default_value' => max(2, count($node->choice) ? count($node->choice) : 5)); $form['choice']['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."), '#weight' => 1); @@ -271,7 +270,15 @@ function poll_load($node) { * Implementation of hook_node_info(). */ function poll_node_info() { - return array('poll' => array('name' => t("poll"), 'base' => 'poll')); + return array( + 'poll' => array( + 'name' => t("poll"), + 'module' => 'poll', + 'description' => t("A poll is a multiple-choice question which visitors can vote on."), + 'title_label' => t('Question'), + 'has_body' => FALSE, + ) + ); } function poll_page() { |