summaryrefslogtreecommitdiff
path: root/modules/poll
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-09-23 08:47:13 +0000
committerDries Buytaert <dries@buytaert.net>2005-09-23 08:47:13 +0000
commit61740bd8ee133c3d0ea2543bccc4d00a62c9e3a0 (patch)
tree814cc9a6da1ec51a6e3eca921dc001ae6b5dee6a /modules/poll
parente3a4085a07647878142d1c51a6977a5b98f707ea (diff)
downloadbrdo-61740bd8ee133c3d0ea2543bccc4d00a62c9e3a0.tar.gz
brdo-61740bd8ee133c3d0ea2543bccc4d00a62c9e3a0.tar.bz2
- Patch #10056: allow the node title forms to be customized.
Diffstat (limited to 'modules/poll')
-rw-r--r--modules/poll/poll.module7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 129705faa..b8249347a 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -92,6 +92,9 @@ function poll_delete($node) {
* Implementation of hook_validate().
*/
function poll_validate(&$node) {
+
+ node_validate_title($node,t('You have to specify a question.'));
+
if (isset($node->title)) {
// Check for at least two options and validate amount of votes:
$realchoices = 0;
@@ -120,8 +123,10 @@ function poll_validate(&$node) {
function poll_form(&$node) {
$admin = user_access('administer nodes');
+ $output = form_textfield(t('Question'), 'title', $node->title, 60, 128, NULL, NULL, TRUE);
+
if (function_exists('taxonomy_node_form')) {
- $output = implode('', taxonomy_node_form('poll', $node));
+ $output .= implode('', taxonomy_node_form('poll', $node));
}
if (!isset($node->choices)) {