summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-03 21:01:04 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-03 21:01:04 +0000
commitba6ef3017eb8ac1e6ccfd1ffebf97a476859315d (patch)
tree8d9f52358a4c0118b07a03d437c7d5dfe290999c /modules
parent8c4b6239b48a46e754e23a803f4a28745b4eb027 (diff)
downloadbrdo-ba6ef3017eb8ac1e6ccfd1ffebf97a476859315d.tar.gz
brdo-ba6ef3017eb8ac1e6ccfd1ffebf97a476859315d.tar.bz2
#482816 by sun and Rob Loach: Add a consistent wrapper around submit buttons.
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator/aggregator.admin.inc3
-rw-r--r--modules/aggregator/aggregator.pages.inc3
-rw-r--r--modules/block/block.admin.inc10
-rw-r--r--modules/comment/comment.module5
-rw-r--r--modules/contact/contact.admin.inc3
-rw-r--r--modules/contact/contact.pages.inc3
-rw-r--r--modules/dblog/dblog.admin.inc9
-rw-r--r--modules/dblog/dblog.css7
-rw-r--r--modules/dblog/dblog.module28
-rw-r--r--modules/field_ui/field_ui.admin.inc3
-rw-r--r--modules/field_ui/field_ui.module2
-rw-r--r--modules/filter/filter.admin.inc6
-rw-r--r--modules/forum/forum.admin.inc10
-rw-r--r--modules/image/image.admin.inc6
-rw-r--r--modules/locale/locale.css6
-rw-r--r--modules/locale/locale.module22
-rw-r--r--modules/menu/menu.admin.inc4
-rw-r--r--modules/node/content_types.inc5
-rw-r--r--modules/node/node.admin.inc30
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/node/node.pages.inc13
-rw-r--r--modules/openid/openid.pages.inc3
-rw-r--r--modules/profile/profile.admin.inc4
-rw-r--r--modules/shortcut/shortcut.admin.inc6
-rw-r--r--modules/syslog/syslog.module2
-rw-r--r--modules/system/system.admin.inc18
-rw-r--r--modules/system/system.module9
-rw-r--r--modules/user/user-rtl.css2
-rw-r--r--modules/user/user.admin.inc37
-rw-r--r--modules/user/user.css4
-rw-r--r--modules/user/user.module4
31 files changed, 125 insertions, 146 deletions
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc
index 0856bd32b..9e1fdfbcb 100644
--- a/modules/aggregator/aggregator.admin.inc
+++ b/modules/aggregator/aggregator.admin.inc
@@ -470,7 +470,8 @@ function aggregator_admin_form($form, $form_state) {
// Implementing modules will expect an array at $form['modules'].
$form['modules'] = array();
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
diff --git a/modules/aggregator/aggregator.pages.inc b/modules/aggregator/aggregator.pages.inc
index 5690aa798..45e21e23a 100644
--- a/modules/aggregator/aggregator.pages.inc
+++ b/modules/aggregator/aggregator.pages.inc
@@ -184,7 +184,8 @@ function aggregator_categorize_items($items, $feed_source = '') {
'#multiple' => TRUE
);
}
- $form['submit'] = array('#type' => 'submit', '#value' => t('Save categories'));
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save categories'));
return $form;
}
diff --git a/modules/block/block.admin.inc b/modules/block/block.admin.inc
index c25cbdc16..c75b9c3ee 100644
--- a/modules/block/block.admin.inc
+++ b/modules/block/block.admin.inc
@@ -102,7 +102,12 @@ function block_admin_display_form($form, &$form_state, $blocks, $theme) {
// Do not allow disabling the main system content block.
unset($form['system_main']['region']['#options'][BLOCK_REGION_NONE]);
- $form['submit'] = array(
+ $form['actions'] = array(
+ '#tree' => FALSE,
+ '#type' => 'container',
+ '#attributes' => array('class' => array('form-actions')),
+ );
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save blocks'),
);
@@ -363,7 +368,8 @@ function block_admin_configure($form, &$form_state, $module, $delta) {
'#default_value' => isset($block->custom) ? $block->custom : 0,
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save block'),
);
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 93aad8e73..dd621e25e 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1846,13 +1846,14 @@ function comment_form($form, &$form_state, $comment) {
// already previewing the submission. However, if there are form errors,
// we hide the save button no matter what, so that optional form elements
// (e.g., captchas) can be updated.
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#access' => ($comment->cid && user_access('administer comments')) || variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_REQUIRED || (!form_get_errors() && isset($form_state['comment_preview'])),
'#weight' => 19,
);
- $form['preview'] = array(
+ $form['actions']['preview'] = array(
'#type' => 'submit',
'#value' => t('Preview'),
'#access' => (variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_DISABLED),
diff --git a/modules/contact/contact.admin.inc b/modules/contact/contact.admin.inc
index 929d5ac12..585d5f8a0 100644
--- a/modules/contact/contact.admin.inc
+++ b/modules/contact/contact.admin.inc
@@ -97,7 +97,8 @@ function contact_category_edit_form($form, &$form_state, array $category = array
'#type' => 'value',
'#value' => $category['cid'],
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc
index 3dd4c3e47..17e1bf1bc 100644
--- a/modules/contact/contact.pages.inc
+++ b/modules/contact/contact.pages.inc
@@ -101,7 +101,8 @@ function contact_site_form($form, &$form_state) {
'#title' => t('Send yourself a copy.'),
'#access' => $user->uid,
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Send message'),
);
diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc
index 7874d0b34..37b1af247 100644
--- a/modules/dblog/dblog.admin.inc
+++ b/modules/dblog/dblog.admin.inc
@@ -274,7 +274,6 @@ function dblog_filter_form($form) {
$form['filters'] = array(
'#type' => 'fieldset',
'#title' => t('Filter log messages'),
- '#theme' => 'dblog_filters',
'#collapsible' => TRUE,
'#collapsed' => empty($session),
);
@@ -291,12 +290,16 @@ function dblog_filter_form($form) {
}
}
- $form['filters']['buttons']['submit'] = array(
+ $form['filters']['actions'] = array(
+ '#type' => 'container',
+ '#attributes' => array('class' => array('form-actions', 'container-inline')),
+ );
+ $form['filters']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Filter'),
);
if (!empty($_SESSION['dblog_overview_filter'])) {
- $form['filters']['buttons']['reset'] = array(
+ $form['filters']['actions']['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset')
);
diff --git a/modules/dblog/dblog.css b/modules/dblog/dblog.css
index d8a5c9b9c..343dcd13a 100644
--- a/modules/dblog/dblog.css
+++ b/modules/dblog/dblog.css
@@ -11,9 +11,14 @@
*/
width: 15em;
}
-#dblog-filter-form .form-item select.form-select {
+#dblog-filter-form .form-type-select select {
width: 100%;
}
+#dblog-filter-form .form-actions {
+ float: left;
+ padding: 3ex 0 0 1em;
+}
+
tr.dblog-user {
background: #ffd;
}
diff --git a/modules/dblog/dblog.module b/modules/dblog/dblog.module
index 1d2dc015f..9d72fee38 100644
--- a/modules/dblog/dblog.module
+++ b/modules/dblog/dblog.module
@@ -35,17 +35,6 @@ function dblog_help($path, $arg) {
}
/**
- * Implements hook_theme().
- */
-function dblog_theme() {
- return array(
- 'dblog_filters' => array(
- 'render element' => 'form',
- ),
- );
-}
-
-/**
* Implements hook_menu().
*/
function dblog_menu() {
@@ -172,21 +161,6 @@ function dblog_form_system_logging_settings_alter(&$form, $form_state) {
'#options' => array(0 => t('All')) + drupal_map_assoc(array(100, 1000, 10000, 100000, 1000000)),
'#description' => t('The maximum number of entries to keep in the database log. Requires a <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status')))
);
- $form['buttons']['#weight'] = 1;
+ $form['actions']['#weight'] = 1;
}
-/**
- * Theme dblog administration filter selector.
- *
- * @ingroup themeable
- */
-function theme_dblog_filters($variables) {
- $form = $variables['form'];
- $output = '';
-
- foreach (element_children($form['status']) as $key) {
- $output .= drupal_render($form['status'][$key]);
- }
- $output .= '<div id="dblog-admin-buttons">' . drupal_render($form['buttons']) . '</div>';
- return $output;
-}
diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc
index c809adc4c..2e334ac37 100644
--- a/modules/field_ui/field_ui.admin.inc
+++ b/modules/field_ui/field_ui.admin.inc
@@ -867,7 +867,8 @@ function field_ui_field_settings_form($form, &$form_state, $obj_type, $bundle, $
$form['#object_type'] = $obj_type;
$form['#bundle'] = $bundle;
- $form['submit'] = array('#type' => 'submit', '#value' => t('Save field settings'));
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save field settings'));
return $form;
}
diff --git a/modules/field_ui/field_ui.module b/modules/field_ui/field_ui.module
index 155849bce..93c436fa7 100644
--- a/modules/field_ui/field_ui.module
+++ b/modules/field_ui/field_ui.module
@@ -321,7 +321,7 @@ function field_ui_inactive_instances($obj_type, $bundle_name = NULL) {
function field_ui_form_node_type_form_alter(&$form, $form_state) {
// We want to display the button only on add page.
if (empty($form['#node_type']->type)) {
- $form['save_continue'] = array(
+ $form['actions']['save_continue'] = array(
'#type' => 'submit',
'#value' => t('Save and add fields'),
'#weight' => 45,
diff --git a/modules/filter/filter.admin.inc b/modules/filter/filter.admin.inc
index 66757e9e4..abd7acce2 100644
--- a/modules/filter/filter.admin.inc
+++ b/modules/filter/filter.admin.inc
@@ -36,7 +36,8 @@ function filter_admin_overview($form) {
$form['formats'][$id]['delete'] = array('#type' => 'link', '#title' => t('delete'), '#href' => 'admin/config/content/formats/' . $id . '/delete', '#access' => !$form['formats'][$id]['#is_fallback']);
$form['formats'][$id]['weight'] = array('#type' => 'weight', '#default_value' => $format->weight);
}
- $form['submit'] = array('#type' => 'submit', '#value' => t('Save changes'));
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save changes'));
return $form;
}
@@ -215,7 +216,8 @@ function filter_admin_format_form($form, &$form_state, $format) {
if (!empty($format->format)) {
$form['format'] = array('#type' => 'value', '#value' => $format->format);
}
- $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
return $form;
}
diff --git a/modules/forum/forum.admin.inc b/modules/forum/forum.admin.inc
index 105e2fd26..415fa10bd 100644
--- a/modules/forum/forum.admin.inc
+++ b/modules/forum/forum.admin.inc
@@ -55,9 +55,10 @@ function forum_form_forum($form, &$form_state, $edit = array()) {
);
$form['vid'] = array('#type' => 'hidden', '#value' => variable_get('forum_nav_vocabulary', ''));
- $form['submit' ] = array('#type' => 'submit', '#value' => t('Save'));
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit' ] = array('#type' => 'submit', '#value' => t('Save'));
if ($edit['tid']) {
- $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
+ $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
$form['tid'] = array('#type' => 'hidden', '#value' => $edit['tid']);
}
$form['#submit'][] = 'forum_form_submit';
@@ -156,12 +157,13 @@ function forum_form_container($form, &$form_state, $edit = array()) {
'#type' => 'hidden',
'#value' => variable_get('forum_nav_vocabulary', ''),
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save')
);
if ($edit['tid']) {
- $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
+ $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
$form['tid'] = array('#type' => 'value', '#value' => $edit['tid']);
}
$form['#submit'][] = 'forum_form_submit';
diff --git a/modules/image/image.admin.inc b/modules/image/image.admin.inc
index 413b9bbf9..3ca88d5cf 100644
--- a/modules/image/image.admin.inc
+++ b/modules/image/image.admin.inc
@@ -388,12 +388,12 @@ function image_effect_form($form, &$form_state, $style, $effect) {
'#value' => isset($_GET['weight']) ? intval($_GET['weight']) : (isset($effect['weight']) ? $effect['weight'] : count($style['effects'])),
);
- $form['buttons'] = array('#tree' => FALSE);
- $form['buttons']['submit'] = array(
+ $form['actions'] = array('#tree' => FALSE, '#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => isset($effect['ieid']) ? t('Update effect') : t('Add effect'),
);
- $form['buttons']['cancel'] = array(
+ $form['actions']['cancel'] = array(
'#type' => 'link',
'#title' => t('Cancel'),
'#href' => 'admin/config/media/image-styles/edit/' . $style['name'],
diff --git a/modules/locale/locale.css b/modules/locale/locale.css
index b571a20d1..f4b5ea758 100644
--- a/modules/locale/locale.css
+++ b/modules/locale/locale.css
@@ -16,9 +16,13 @@
*/
width: 15em;
}
-#locale-translation-filter-form .form-item select.form-select {
+#locale-translation-filter-form .form-type-select select {
width: 100%;
}
+#locale-translation-filter-form .form-actions {
+ float: left;
+ padding: 3ex 0 0 1em;
+}
.language-switcher-locale-session .active a.active {
color: #0062A0;
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 7bcd590c3..e588fbbb4 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -460,9 +460,6 @@ function locale_theme() {
'locale_languages_configure_form' => array(
'render element' => 'form',
),
- 'locale_translation_filters' => array(
- 'render element' => 'form',
- ),
'locale_date_format_form' => array(
'render element' => 'form',
),
@@ -902,22 +899,6 @@ function locale_block_view($type) {
}
/**
- * Theme locale translation filter selector.
- *
- * @ingroup themeable
- */
-function theme_locale_translation_filters($variables) {
- $form = $variables['form'];
- $output = '';
-
- foreach (element_children($form['status']) as $key) {
- $output .= drupal_render($form['status'][$key]);
- }
- $output .= '<div id="locale-translation-buttons">' . drupal_render($form['buttons']) . '</div>';
- return $output;
-}
-
-/**
* Theme locale date format form.
*
* @ingroup themeable
@@ -1019,7 +1000,8 @@ function locale_date_format_form($form, &$form_state, $langcode) {
);
}
- $form['buttons']['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index c6c0ee786..aaedc5ac4 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -63,8 +63,10 @@ function menu_overview_form($form, &$form_state, $menu) {
$form = array_merge($form, _menu_overview_tree_form($tree));
$form['#menu'] = $menu;
+
if (element_children($form)) {
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc
index 24f30f82b..e7c4c9fc1 100644
--- a/modules/node/content_types.inc
+++ b/modules/node/content_types.inc
@@ -234,7 +234,8 @@ function node_type_form($form, &$form_state, $type = NULL) {
'#value' => $type->locked,
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save content type'),
'#weight' => 40,
@@ -242,7 +243,7 @@ function node_type_form($form, &$form_state, $type = NULL) {
if ($type->custom) {
if (!empty($type->type)) {
- $form['delete'] = array(
+ $form['actions']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete content type'),
'#weight' => 45,
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index f57d3346c..f18920486 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -196,10 +196,15 @@ function node_filter_form() {
);
}
- $form['filters']['buttons']['submit'] = array('#type' => 'submit', '#value' => (count($session) ? t('Refine') : t('Filter')));
+ $form['filters']['actions'] = array(
+ '#type' => 'container',
+ '#id' => 'node-admin-buttons',
+ '#attributes' => array('class' => array('form-actions', 'container-inline')),
+ );
+ $form['filters']['actions']['submit'] = array('#type' => 'submit', '#value' => (count($session) ? t('Refine') : t('Filter')));
if (count($session)) {
- $form['filters']['buttons']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));
- $form['filters']['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
+ $form['filters']['actions']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));
+ $form['filters']['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
}
drupal_add_js('misc/form.js');
@@ -208,22 +213,6 @@ function node_filter_form() {
}
/**
- * Theme node administration filter form.
- *
- * @ingroup themeable
- */
-function theme_node_filter_form($variables) {
- $form = $variables['form'];
- $output = '';
-
- $output .= '<div id="node-admin-filter">';
- $output .= drupal_render($form['filters']);
- $output .= '</div>';
- $output .= drupal_render_children($form);
- return $output;
-}
-
-/**
* Theme node administration filter selector.
*
* @ingroup themeable
@@ -250,7 +239,7 @@ function theme_node_filters($variables) {
$output .= '</dd>';
$output .= '</dl>';
- $output .= '<div class="container-inline" id="node-admin-buttons">' . drupal_render($form['buttons']) . '</div>';
+ $output .= drupal_render($form['actions']);
return $output;
}
@@ -393,7 +382,6 @@ function node_admin_content($form, $form_state) {
}
$form['filter'] = node_filter_form();
$form['#submit'][] = 'node_filter_form_submit';
- $form['#theme'] = 'node_filter_form';
$form['admin'] = node_admin_nodes();
return $form;
diff --git a/modules/node/node.module b/modules/node/node.module
index ccee7c4fe..98cd00f94 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -144,10 +144,6 @@ function node_theme() {
'node_search_admin' => array(
'render element' => 'form',
),
- 'node_filter_form' => array(
- 'render element' => 'form',
- 'file' => 'node.admin.inc',
- ),
'node_filters' => array(
'render element' => 'form',
'file' => 'node.admin.inc',
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index f01419e13..77193ab2a 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -268,16 +268,19 @@ function node_form($form, &$form_state, $node) {
}
// Add the buttons.
- $form['buttons'] = array('#type' => 'container');
- $form['buttons']['#weight'] = 100;
- $form['buttons']['submit'] = array(
+ $form['actions'] = array(
+ '#type' => 'container',
+ '#attributes' => array('class' => array('form-actions')),
+ '#weight' => 100,
+ );
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#access' => variable_get('node_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_REQUIRED || (!form_get_errors() && isset($form_state['node_preview'])),
'#value' => t('Save'),
'#weight' => 5,
'#submit' => array('node_form_submit'),
);
- $form['buttons']['preview'] = array(
+ $form['actions']['preview'] = array(
'#access' => variable_get('node_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_DISABLED,
'#type' => 'submit',
'#value' => t('Preview'),
@@ -285,7 +288,7 @@ function node_form($form, &$form_state, $node) {
'#submit' => array('node_form_build_preview'),
);
if (!empty($node->nid) && node_access('delete', $node)) {
- $form['buttons']['delete'] = array(
+ $form['actions']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#weight' => 15,
diff --git a/modules/openid/openid.pages.inc b/modules/openid/openid.pages.inc
index 11f82c986..eb8da817c 100644
--- a/modules/openid/openid.pages.inc
+++ b/modules/openid/openid.pages.inc
@@ -73,7 +73,8 @@ function openid_user_add() {
'#type' => 'textfield',
'#title' => t('OpenID'),
);
- $form['submit'] = array('#type' => 'submit', '#value' => t('Add an OpenID'));
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Add an OpenID'));
return $form;
}
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index c7c103375..7503bcaa3 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -284,7 +284,9 @@ Unless you know what you are doing, it is highly recommended that you prefix the
'#title' => t('Visible in user registration form.'),
'#default_value' => $edit['register'],
);
- $form['submit'] = array('#type' => 'submit',
+
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array('#type' => 'submit',
'#value' => t('Save field'),
);
return $form;
diff --git a/modules/shortcut/shortcut.admin.inc b/modules/shortcut/shortcut.admin.inc
index 27b6a5dfd..f59493c79 100644
--- a/modules/shortcut/shortcut.admin.inc
+++ b/modules/shortcut/shortcut.admin.inc
@@ -78,7 +78,8 @@ function shortcut_set_switch($form, &$form_state, $account = NULL) {
'js' => array(drupal_get_path('module', 'shortcut') . '/shortcut.admin.js'),
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
@@ -195,7 +196,8 @@ function shortcut_set_customize($form, &$form_state, $shortcut_set) {
'js' => array(drupal_get_path('module', 'shortcut') . '/shortcut.admin.js'),
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save Changes'),
);
diff --git a/modules/syslog/syslog.module b/modules/syslog/syslog.module
index 87b406bdd..27c871af0 100644
--- a/modules/syslog/syslog.module
+++ b/modules/syslog/syslog.module
@@ -46,7 +46,7 @@ function syslog_form_system_logging_settings_alter(&$form, &$form_state) {
'#options' => syslog_facility_list(),
'#description' => t('Depending on the system configuration, Syslog and other logging tools use this code to identify or filter messages from within the entire system log.') . $help,
);
- $form['buttons']['#weight'] = 1;
+ $form['actions']['#weight'] = 1;
}
}
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 9b24c5b43..4097341d9 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -349,7 +349,8 @@ 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']['submit'] = array(
+ $form['admin_theme']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['admin_theme']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
@@ -950,7 +951,8 @@ function system_modules($form, $form_state = array()) {
);
}
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
@@ -1304,7 +1306,8 @@ function system_modules_uninstall($form, $form_state = NULL) {
'#type' => 'checkboxes',
'#options' => $options,
);
- $form['buttons']['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Uninstall'),
);
@@ -2787,7 +2790,8 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
),
);
- $form['update'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['update'] = array(
'#type' => 'submit',
'#value' => ($dfid ? t('Save format') : t('Add format')),
);
@@ -2914,7 +2918,8 @@ function system_actions_manage_form($form, &$form_state, $options = array()) {
'#options' => $options,
'#description' => '',
);
- $form['parent']['buttons']['submit'] = array(
+ $form['parent']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['parent']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Create'),
);
@@ -3010,7 +3015,8 @@ function system_actions_configure($form, &$form_state, $action = NULL) {
'#type' => 'hidden',
'#value' => '1',
);
- $form['buttons']['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#weight' => 13
diff --git a/modules/system/system.module b/modules/system/system.module
index 6f694eabe..e4edcc4f1 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -2489,7 +2489,9 @@ function _system_settings_form_automatic_defaults($form) {
* The form structure.
*/
function system_settings_form($form, $automatic_defaults = TRUE) {
- $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') );
+ $form['actions']['#type'] = 'container';
+ $form['actions']['#attributes']['class'][] = 'form-actions';
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
if ($automatic_defaults) {
$form = _system_settings_form_automatic_defaults($form);
@@ -2600,7 +2602,10 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
$form['description'] = array('#markup' => $description);
$form[$name] = array('#type' => 'hidden', '#value' => 1);
- $form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
+ $form['actions'] = array(
+ '#type' => 'container',
+ '#attributes' => array('class' => array('form-actions', 'container-inline')),
+ );
$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().
diff --git a/modules/user/user-rtl.css b/modules/user/user-rtl.css
index ca3d9fa87..9f8219619 100644
--- a/modules/user/user-rtl.css
+++ b/modules/user/user-rtl.css
@@ -5,7 +5,7 @@
padding-right: 1.5em;
}
-#user-admin-filter dl.multiselect dd .form-item label {
+#user-filter-form dl.multiselect dd .form-item label {
float: right;
}
diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc
index 882cf6c5f..b84271d64 100644
--- a/modules/user/user.admin.inc
+++ b/modules/user/user.admin.inc
@@ -72,16 +72,21 @@ function user_filter_form() {
);
}
- $form['filters']['buttons']['submit'] = array(
+ $form['filters']['actions'] = array(
+ '#type' => 'container',
+ '#id' => 'user-admin-buttons',
+ '#attributes' => array('class' => array('form-actions', 'container-inline')),
+ );
+ $form['filters']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => (count($session) ? t('Refine') : t('Filter')),
);
if (count($session)) {
- $form['filters']['buttons']['undo'] = array(
+ $form['filters']['actions']['undo'] = array(
'#type' => 'submit',
'#value' => t('Undo'),
);
- $form['filters']['buttons']['reset'] = array(
+ $form['filters']['actions']['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset'),
);
@@ -698,7 +703,9 @@ function user_admin_permissions($form, $form_state, $rid = NULL) {
$form['checkboxes'][$rid] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => isset($status[$rid]) ? $status[$rid] : array());
$form['role_names'][$rid] = array('#markup' => $name, '#tree' => TRUE);
}
- $form['submit'] = array('#type' => 'submit', '#value' => t('Save permissions'));
+
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save permissions'));
$form['#attached']['js'][] = drupal_get_path('module', 'user') . '/user.permissions.js';
@@ -787,11 +794,12 @@ function user_admin_role() {
'#type' => 'value',
'#value' => $rid,
);
- $form['submit'] = array(
+ $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+ $form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save role'),
);
- $form['delete'] = array(
+ $form['actions']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete role'),
);
@@ -876,21 +884,6 @@ function theme_user_admin_new_role($variables) {
}
/**
- * Theme user administration filter form.
- *
- * @ingroup themeable
- */
-function theme_user_filter_form($variables) {
- $form = $variables['form'];
-
- $output = '<div id="user-admin-filter">';
- $output .= drupal_render($form['filters']);
- $output .= '</div>';
- $output .= drupal_render_children($form);
- return $output;
-}
-
-/**
* Theme user administration filter selector.
*
* @ingroup themeable
@@ -916,7 +909,7 @@ function theme_user_filters($variables) {
$output .= '</dd>';
$output .= '</dl>';
- $output .= '<div class="container-inline" id="user-admin-buttons">' . drupal_render($form['buttons']) . '</div>';
+ $output .= drupal_render($form['actions']);
return $output;
}
diff --git a/modules/user/user.css b/modules/user/user.css
index ceb1562d1..d79e04e90 100644
--- a/modules/user/user.css
+++ b/modules/user/user.css
@@ -10,10 +10,10 @@
white-space: normal;
}
/* Override the default multiselect layout in system.css. */
-#user-admin-filter dl.multiselect dd, dl.multiselect dd .form-item {
+#user-filter-form dl.multiselect dd, dl.multiselect dd .form-item {
width: 20em; /* 6em label + 14em select */
}
-#user-admin-filter dl.multiselect dd .form-item label {
+#user-filter-form dl.multiselect dd .form-item label {
display: block;
float: left; /* LTR */
width: 6em;
diff --git a/modules/user/user.module b/modules/user/user.module
index cf1db1f1e..e9e3849fa 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -106,10 +106,6 @@ function user_theme() {
'render element' => 'form',
'file' => 'user.admin.inc',
),
- 'user_filter_form' => array(
- 'render element' => 'form',
- 'file' => 'user.admin.inc',
- ),
'user_filters' => array(
'render element' => 'form',
'file' => 'user.admin.inc',