diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-29 11:54:37 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-29 11:54:37 +0000 |
commit | 259e2f5c7ed239d6d9213a90ca1a8af950b3c21b (patch) | |
tree | 1050ce02e488205034d10501aac56543ecba1f00 /modules/comment | |
parent | aafd4733ba094572a9098bef23b0df26f821f167 (diff) | |
download | brdo-259e2f5c7ed239d6d9213a90ca1a8af950b3c21b.tar.gz brdo-259e2f5c7ed239d6d9213a90ca1a8af950b3c21b.tar.bz2 |
#195678 by catch: standardise on Save and Preview button terminology (for comments) and button placement for comments and nodes, so Save is always the leftmost button, and there is no guessing to find it
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 8fd0e1ab4..dc217aca6 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1312,17 +1312,17 @@ function comment_form(&$form_state, $edit, $title = NULL) { $form['nid'] = array('#type' => 'value', '#value' => $edit['nid']); $form['uid'] = array('#type' => 'value', '#value' => !empty($edit['uid']) ? $edit['uid'] : NULL); - $form['preview'] = array('#type' => 'button', '#value' => t('Preview comment'), '#weight' => 19); - $form['#token'] = 'comment'. $edit['nid'] . (isset($edit['pid']) ? $edit['pid'] : ''); - - // 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 + // Only show save button if preview is optional or if we are in preview mode. + // We show the save 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 (!form_get_errors() && ((variable_get('comment_preview_'. $node->type, COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview comment')) || ($op == t('Post comment')))) { - $form['submit'] = array('#type' => 'submit', '#value' => t('Post comment'), '#weight' => 20); + if (!form_get_errors() && ((variable_get('comment_preview_'. $node->type, COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview')) || ($op == t('Save')))) { + $form['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#weight' => 19); } + + $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 20); + $form['#token'] = 'comment'. $edit['nid'] . (isset($edit['pid']) ? $edit['pid'] : ''); - if ($op == t('Preview comment')) { + if ($op == t('Preview')) { $form['#after_build'] = array('comment_form_add_preview'); } |