diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-12-23 06:47:24 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-12-23 06:47:24 +0000 |
commit | b2e04ead896b6a964c1833aaa7a89875dc39005c (patch) | |
tree | 9215c68abf97ebfacdeadeac73de435c394b972c /modules/comment/comment.module | |
parent | 046536f470450f94c22aa8058d966716fbfbcab4 (diff) | |
download | brdo-b2e04ead896b6a964c1833aaa7a89875dc39005c.tar.gz brdo-b2e04ead896b6a964c1833aaa7a89875dc39005c.tar.bz2 |
- Patch #14710 by tangent: only show post button if preview is optional or if we are in preview mode. We show the post button in preview mode even if there are form errors so that optional form elements (e.g., captcha) can be updated in preview mode.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index a6f848f74..ac086f445 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1400,7 +1400,10 @@ function theme_comment_form($edit, $title) { $form .= form_submit(t('Preview comment')); - if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment') && !form_get_errors())) { + // Only show post button if preview is optional or if we are in preview mode. + // We show the post button in preview mode even if there are form errors so that + // optional form elements (e.g., captcha) can be updated in preview mode. + if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment')) || ($_POST['op'] == t('Post comment'))) { $form .= form_submit(t('Post comment')); } |