summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc18
-rw-r--r--modules/system/system.module13
2 files changed, 18 insertions, 13 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index aa70243e0..277fc3d70 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -345,7 +345,7 @@ function system_themes_admin_form($form, &$form_state, $theme_options) {
'#title' => t('Use the administration theme when editing or creating content'),
'#default_value' => variable_get('node_admin_theme', '0'),
);
- $form['admin_theme']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['admin_theme']['actions'] = array('#type' => 'actions');
$form['admin_theme']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
@@ -950,7 +950,7 @@ function system_modules($form, $form_state = array()) {
);
}
- $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
@@ -1307,7 +1307,7 @@ function system_modules_uninstall($form, $form_state = NULL) {
'#type' => 'checkboxes',
'#options' => $options,
);
- $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Uninstall'),
@@ -1439,7 +1439,8 @@ function system_ip_blocking_form($form, $form_state, $default_ip) {
'#default_value' => $default_ip,
'#description' => t('Enter a valid IP address.'),
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'actions');
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
@@ -2076,7 +2077,8 @@ function system_add_date_format_type_form($form, &$form_state) {
'#required' => TRUE,
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'actions');
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Add date type'),
);
@@ -2779,7 +2781,7 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
),
);
- $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions'] = array('#type' => 'actions');
$form['actions']['update'] = array(
'#type' => 'submit',
'#value' => ($dfid ? t('Save format') : t('Add format')),
@@ -2906,7 +2908,7 @@ function system_actions_manage_form($form, &$form_state, $options = array()) {
'#options' => $options,
'#description' => '',
);
- $form['parent']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['parent']['actions'] = array('#type' => 'actions');
$form['parent']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Create'),
@@ -3003,7 +3005,7 @@ function system_actions_configure($form, &$form_state, $action = NULL) {
'#type' => 'hidden',
'#value' => '1',
);
- $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
diff --git a/modules/system/system.module b/modules/system/system.module
index 1e526fcb0..a33807dfd 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -472,6 +472,11 @@ function system_element_info() {
'#theme_wrappers' => array('container'),
'#process' => array('form_process_container'),
);
+ $types['actions'] = array(
+ '#theme_wrappers' => array('container'),
+ '#process' => array('form_process_actions', 'form_process_container'),
+ '#weight' => 100,
+ );
$types['token'] = array(
'#input' => TRUE,
@@ -2575,9 +2580,7 @@ function _system_settings_form_automatic_defaults($form) {
* @ingroup forms
*/
function system_settings_form($form, $automatic_defaults = TRUE) {
- $form['actions']['#type'] = 'container';
- $form['actions']['#attributes']['class'][] = 'form-actions';
- $form['actions']['#weight'] = 100;
+ $form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
if ($automatic_defaults) {
@@ -2690,8 +2693,8 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
$form[$name] = array('#type' => 'hidden', '#value' => 1);
$form['actions'] = array(
- '#type' => 'container',
- '#attributes' => array('class' => array('form-actions', 'container-inline')),
+ '#type' => 'actions',
+ '#attributes' => array('class' => array('container-inline')),
);
$form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
$form['actions']['cancel'] = array('#markup' => $cancel);