Commit 26ba3782 authored by Dries's avatar Dries
Browse files

- Patch #50982 by kuba: converted the admin filter overview page to the submit-model.

parent e3db356a
......@@ -271,14 +271,6 @@ function filter_perm() {
*/
function filter_admin_overview() {
$edit = isset($_POST['edit']) ? $_POST['edit'] : '';
// Process form submission to set the default format
if (is_numeric($edit['default'])) {
drupal_set_message(t('Default format updated.'));
variable_set('filter_default_format', $edit['default']);
}
// Overview of all formats.
$formats = filter_formats();
$error = false;
......@@ -305,6 +297,14 @@ function filter_admin_overview() {
return drupal_get_form('filter_admin_overview', $form);
}
function filter_admin_overview_submit($form_id, $form_values) {
// Process form submission to set the default format
if (is_numeric($form_values['default'])) {
drupal_set_message(t('Default format updated.'));
variable_set('filter_default_format', $form_values['default']);
}
}
function theme_filter_admin_overview($form) {
foreach ($form as $name => $element) {
if (isset($element['roles']) && is_array($element['roles'])) {
......
......@@ -271,14 +271,6 @@ function filter_perm() {
*/
function filter_admin_overview() {
$edit = isset($_POST['edit']) ? $_POST['edit'] : '';
// Process form submission to set the default format
if (is_numeric($edit['default'])) {
drupal_set_message(t('Default format updated.'));
variable_set('filter_default_format', $edit['default']);
}
// Overview of all formats.
$formats = filter_formats();
$error = false;
......@@ -305,6 +297,14 @@ function filter_admin_overview() {
return drupal_get_form('filter_admin_overview', $form);
}
function filter_admin_overview_submit($form_id, $form_values) {
// Process form submission to set the default format
if (is_numeric($form_values['default'])) {
drupal_set_message(t('Default format updated.'));
variable_set('filter_default_format', $form_values['default']);
}
}
function theme_filter_admin_overview($form) {
foreach ($form as $name => $element) {
if (isset($element['roles']) && is_array($element['roles'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment