Skip to content
Snippets Groups Projects
Commit e29eb4dd authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #922634 by sun: odd form actions in confirm_form().

parent f40a5c18
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -2777,7 +2777,6 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL, ...@@ -2777,7 +2777,6 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
else { else {
$options = array('path' => $path); $options = array('path' => $path);
} }
$cancel = l($no ? $no : t('Cancel'), $options['path'], $options);
drupal_set_title($question, PASS_THROUGH); drupal_set_title($question, PASS_THROUGH);
...@@ -2785,12 +2784,17 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL, ...@@ -2785,12 +2784,17 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
$form['description'] = array('#markup' => $description); $form['description'] = array('#markup' => $description);
$form[$name] = array('#type' => 'hidden', '#value' => 1); $form[$name] = array('#type' => 'hidden', '#value' => 1);
$form['actions'] = array( $form['actions'] = array('#type' => 'actions');
'#type' => 'actions', $form['actions']['submit'] = array(
'#attributes' => array('class' => array('container-inline')), '#type' => 'submit',
'#value' => $yes ? $yes : t('Confirm'),
);
$form['actions']['cancel'] = array(
'#type' => 'link',
'#title' => $no ? $no : t('Cancel'),
'#href' => $options['path'],
'#options' => $options,
); );
$form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
$form['actions']['cancel'] = array('#markup' => $cancel);
// By default, render the form using theme_confirm_form(). // By default, render the form using theme_confirm_form().
if (!isset($form['#theme'])) { if (!isset($form['#theme'])) {
$form['#theme'] = 'confirm_form'; $form['#theme'] = 'confirm_form';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment