summaryrefslogtreecommitdiff
path: root/modules/profile
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-24 14:49:14 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-24 14:49:14 +0000
commit45f4a1e166d090e23cb385c3238835fce61d1607 (patch)
tree63384d78144e0caee7c6700c44e444a70fc58845 /modules/profile
parent3e547ae045849264745f8cc456a0f379246060ea (diff)
downloadbrdo-45f4a1e166d090e23cb385c3238835fce61d1607.tar.gz
brdo-45f4a1e166d090e23cb385c3238835fce61d1607.tar.bz2
- Patch #482816 by sun, Rob Loach: make a consistent wrapper around submit buttons.
Diffstat (limited to 'modules/profile')
-rw-r--r--modules/profile/profile.admin.inc13
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index d7d653b99..0bb13278a 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -40,7 +40,8 @@ function profile_admin_overview($form) {
// Display the submit button only when there's more than one field
if (count($form) > 1) {
- $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
+ $form['actions'] = array('#type' => 'actions');
+ $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
}
else {
// Disable combo boxes when there isn't a submit button
@@ -105,7 +106,7 @@ function theme_profile_admin_overview($variables) {
drupal_add_css(drupal_get_path('module', 'profile') . '/profile.css');
// Add javascript if there's more than one field.
- if (isset($form['submit'])) {
+ if (isset($form['actions'])) {
drupal_add_js(drupal_get_path('module', 'profile') . '/profile.js');
}
@@ -127,7 +128,7 @@ function theme_profile_admin_overview($variables) {
$rows[] = array('data' => array(array('data' => '<em>' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '</em>', 'colspan' => 7)), 'class' => array('category-' . $category_number . '-message', 'category-message', 'category-populated'));
// Make it draggable only if there is more than one field
- if (isset($form['submit'])) {
+ if (isset($form['actions'])) {
drupal_add_tabledrag('profile-fields', 'order', 'sibling', 'profile-weight', 'profile-weight-' . $category_number);
drupal_add_tabledrag('profile-fields', 'match', 'sibling', 'profile-category', 'profile-category-' . $category_number);
}
@@ -143,7 +144,7 @@ function theme_profile_admin_overview($variables) {
$row[] = drupal_render($field['title']);
$row[] = drupal_render($field['name']);
$row[] = drupal_render($field['type']);
- if (isset($form['submit'])) {
+ if (isset($form['actions'])) {
$row[] = drupal_render($field['category']);
$row[] = drupal_render($field['weight']);
}
@@ -154,7 +155,7 @@ function theme_profile_admin_overview($variables) {
}
$header = array(t('Title'), t('Name'), t('Type'));
- if (isset($form['submit'])) {
+ if (isset($form['actions'])) {
$header[] = t('Category');
$header[] = t('Weight');
}
@@ -286,7 +287,7 @@ Unless you know what you are doing, it is highly recommended that you prefix the
'#default_value' => $edit['register'],
);
- $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 field'),
);