summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-03-17 18:30:14 +0000
committerDries Buytaert <dries@buytaert.net>2007-03-17 18:30:14 +0000
commit4b635f6d0a21e9a1358a6f9540ef72a55682738b (patch)
tree2b789c7c25f3670f676c8e029249582497e3c060 /modules
parentf6929dcca0870e6d38654a126fe4f6c422cd9936 (diff)
downloadbrdo-4b635f6d0a21e9a1358a6f9540ef72a55682738b.tar.gz
brdo-4b635f6d0a21e9a1358a6f9540ef72a55682738b.tar.bz2
- Patch #128081 by Eaton: remove #base, paving the path for a simpler form API.
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator/aggregator.module4
-rw-r--r--modules/book/book.module4
-rw-r--r--modules/forum/forum.module8
-rw-r--r--modules/menu/menu.module4
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/path/path.module4
-rw-r--r--modules/search/search.module4
-rw-r--r--modules/system/system.module8
-rw-r--r--modules/user/user.module16
9 files changed, 42 insertions, 14 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 9601203ac..1569db535 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -1052,7 +1052,9 @@ function aggregator_page_category() {
}
function aggregator_page_list($sql, $header, $categorize) {
- $form['#base'] = 'aggregator_page_list';
+ $form['#submit']['aggregator_page_list_submit'] = array();
+ $form['#validate']['aggregator_page_list_validate'] = array();
+ $form['#theme'] = 'aggregator_page_list';
$form['header'] = array('#value' => $header);
$result = pager_query($sql, 20);
$categories = array();
diff --git a/modules/book/book.module b/modules/book/book.module
index 93fb4b96e..d96972a78 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -912,7 +912,9 @@ function book_admin_orphan() {
else {
$form['error'] = array('#value' => '<p>'. t('There are no orphan pages.') .'</p>');
}
- $form['#base'] = 'book_admin_edit';
+ $form['#submit']['book_admin_edit_submit'] = array();
+ $form['#validate']['book_admin_edit_validate'] = array();
+ $form['#theme'] = 'book_admin_edit';
return $form;
}
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 09e0242bd..4ff56a177 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -473,7 +473,9 @@ function forum_form_container($edit = array()) {
$form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
$form['tid'] = array('#type' => 'value', '#value' => $edit['tid']);
}
- $form['#base'] = 'forum_form';
+ $form['#submit']['forum_form_submit'] = array();
+ $form['#validate']['forum_form_validate'] = array();
+ $form['#theme'] = 'forum_form';
return $form;
}
@@ -524,7 +526,9 @@ function forum_form_forum($edit = array()) {
$form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
$form['tid'] = array('#type' => 'hidden', '#value' => $edit['tid']);
}
- $form['#base'] = 'forum_form';
+ $form['#submit']['forum_form_submit'] = array();
+ $form['#validate']['forum_form_validate'] = array();
+ $form['#theme'] = 'forum_form';
return $form;
}
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 06fb6b398..9c14c6571 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -324,7 +324,9 @@ function menu_edit_menu_form($type, $mid = 0) {
$form['type'] = array('#type' => 'value', '#value' => $item['type']);
$form['submit'] = array('#type' => 'submit', '#value' => t('Submit'));
// Reuse the submit function of menu_edit_item_form.
- $form['#base'] = 'menu_edit_item_form';
+ $form['#submit']['menu_edit_item_form_submit'] = array();
+ $form['#validate']['menu_edit_item_form_validate'] = array();
+ $form['#theme'] = 'menu_edit_item_form';
return $form;
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 39fa95b30..3d57ed162 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2017,7 +2017,9 @@ function node_form($node, $form_values = NULL) {
$form['delete'] = array('#type' => 'button', '#value' => t('Delete'), '#weight' => 50);
}
$form['#after_build'] = array('node_form_add_preview');
- $form['#base'] = 'node_form';
+ $form['#submit']['node_form_submit'] = array();
+ $form['#validate']['node_form_validate'] = array();
+ $form['#theme'] = 'node_form';
return $form;
}
diff --git a/modules/path/path.module b/modules/path/path.module
index e3d7932f1..ba70970e5 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -183,7 +183,9 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL) {
* Return a form for editing or creating an individual URL alias.
*/
function path_form($edit = '') {
- $form['#base'] = 'path_form';
+ $form['#submit']['path_form_submit'] = array();
+ $form['#validate']['path_form_validate'] = array();
+ $form['#theme'] = 'path_form';
$form['src'] = array(
'#type' => 'textfield',
diff --git a/modules/search/search.module b/modules/search/search.module
index 37786dc66..177793015 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -1052,7 +1052,9 @@ function search_box($form_id) {
// Always go to the search page since the search form is not guaranteed to be
// on every page.
$form['#action'] = url('search/node');
- $form['#base'] = 'search_box_form';
+ $form['#submit']['search_box_form_submit'] = array();
+ $form['#validate']['search_box_form_validate'] = array();
+ $form['#theme'] = 'search_box_form';
return $form;
}
diff --git a/modules/system/system.module b/modules/system/system.module
index 18d2bd949..b219c2f6f 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1075,7 +1075,9 @@ function system_settings_form($form) {
if (!empty($_POST) && form_get_errors()) {
drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
}
- $form['#base'] = 'system_settings_form';
+ $form['#submit']['system_settings_form_submit'] = array();
+ $form['#validate']['system_settings_form_validate'] = array();
+ $form['#theme'] = 'system_settings_form';
return $form;
}
@@ -2163,7 +2165,9 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
$form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
$form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
$form['actions']['cancel'] = array('#value' => $cancel);
- $form['#base'] = 'confirm_form';
+ $form['#submit']['confirm_form_submit'] = array();
+ $form['#validate']['confirm_form_validate'] = array();
+ $form['#theme'] = 'confirm_form';
return $form;
}
diff --git a/modules/user/user.module b/modules/user/user.module
index 4ef3fccff..d4ee47d85 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1652,7 +1652,9 @@ function user_admin_check_user() {
$form['user']['test'] = array('#type' => 'textfield', '#title' => '', '#description' => t('Enter a username to check if it will be denied or allowed.'), '#size' => 30, '#maxlength' => USERNAME_MAX_LENGTH);
$form['user']['type'] = array('#type' => 'hidden', '#value' => 'user');
$form['user']['submit'] = array('#type' => 'submit', '#value' => t('Check username'));
- $form['#base'] = 'user_admin_access_check';
+ $form['#submit']['user_admin_access_check_submit'] = array();
+ $form['#validate']['user_admin_access_check_validate'] = array();
+ $form['#theme'] = 'user_admin_access_check';
return $form;
}
@@ -1661,7 +1663,9 @@ function user_admin_check_mail() {
$form['mail']['test'] = array('#type' => 'textfield', '#title' => '', '#description' => t('Enter an e-mail address to check if it will be denied or allowed.'), '#size' => 30, '#maxlength' => EMAIL_MAX_LENGTH);
$form['mail']['type'] = array('#type' => 'hidden', '#value' => 'mail');
$form['mail']['submit'] = array('#type' => 'submit', '#value' => t('Check e-mail'));
- $form['#base'] = 'user_admin_access_check';
+ $form['#submit']['user_admin_access_check_submit'] = array();
+ $form['#validate']['user_admin_access_check_validate'] = array();
+ $form['#theme'] = 'user_admin_access_check';
return $form;
}
@@ -1670,7 +1674,9 @@ function user_admin_check_host() {
$form['host']['test'] = array('#type' => 'textfield', '#title' => '', '#description' => t('Enter a hostname or IP address to check if it will be denied or allowed.'), '#size' => 30, '#maxlength' => 64);
$form['host']['type'] = array('#type' => 'hidden', '#value' => 'host');
$form['host']['submit'] = array('#type' => 'submit', '#value' => t('Check hostname'));
- $form['#base'] = 'user_admin_access_check';
+ $form['#submit']['user_admin_access_check_submit'] = array();
+ $form['#validate']['user_admin_access_check_validate'] = array();
+ $form['#theme'] = 'user_admin_access_check';
return $form;
}
@@ -2020,7 +2026,9 @@ function user_admin_role() {
'#type' => 'submit',
'#value' => t('Add role'),
);
- $form['#base'] = 'user_admin_role';
+ $form['#submit']['user_admin_role_submit'] = array();
+ $form['#validate']['user_admin_role_validate'] = array();
+ $form['#theme'] = 'user_admin_role';
}
return $form;
}