diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-03-03 20:51:27 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-03-03 20:51:27 +0000 |
commit | 198ec98f756673da8c899bb0236a91808ed010ec (patch) | |
tree | e4527ed4574134a16683a9c6c665480e81f86e8e /modules/taxonomy/taxonomy.module | |
parent | 96211c616e6a71e208134272cb5266bac5edd31f (diff) | |
download | brdo-198ec98f756673da8c899bb0236a91808ed010ec.tar.gz brdo-198ec98f756673da8c899bb0236a91808ed010ec.tar.bz2 |
#18329: Unify confirmation messages (and make them themable)
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index ffdc90a6a..a3f3c7983 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -172,12 +172,17 @@ function taxonomy_del_vocabulary($vid) { function _taxonomy_confirm_del_vocabulary($vid) { $vocabulary = taxonomy_get_vocabulary($vid); - $form .= form_hidden('confirm', 1); - $form .= form_hidden('type', 'vocabulary'); - $form .= form_hidden('vid', $vid); - $form .= form_submit(t('Delete')); - - return form(form_item(t('Delete vocabulary "%name"', array('%name' => $vocabulary->name)), $form, t('Are you sure you want to delete the vocabulary and all its terms?'))); + $extra = form_hidden('type', 'vocabulary'); + $extra .= form_hidden('vid', $vid); + + $output = theme('confirm', + t('Are you sure you want to delete the vocabulary %title?', array('%title' => $vocabulary->name)), + 'admin/taxonomy', + t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), + t('Delete'), + t('Cancel'), + $extra); + return $output; } function taxonomy_form_term($edit = array()) { @@ -322,12 +327,16 @@ function taxonomy_del_term($tid) { function _taxonomy_confirm_del_term($tid) { $term = taxonomy_get_term($tid); - $form .= form_hidden('confirm', 1); - $form .= form_hidden('type', 'term'); - $form .= form_hidden('tid', $tid); - $form .= form_submit(t('Delete')); + $extra = form_hidden('type', 'term'); + $extra .= form_hidden('tid', $tid); - $output = form(form_item(t('Delete term "%name" and all its children', array('%name' => $term->name)), $form, t('Are you sure you want to delete the term and all its children (if any)?'))); + $output = theme('confirm', + t('Are you sure you want to delete the term %name?', array('%title' => '<em>'. $vocabulary->name .'</em>')), + 'admin/taxonomy', + t('Deleting a term will delete all its children if there are any. This action cannot be undone.'), + t('Delete'), + t('Cancel'), + $extra); return $output; } |