diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-02 23:22:23 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-02 23:22:23 +0000 |
commit | 2353d1413a8c049cd6ce6aef4695d22c01d992d0 (patch) | |
tree | 3eda8d1a74f4c5040de94589a3a4975f445a1c01 /modules/system/system.module | |
parent | 6afea0a06499dc17fa1a4c9f4d4e210c477ba877 (diff) | |
download | brdo-2353d1413a8c049cd6ce6aef4695d22c01d992d0.tar.gz brdo-2353d1413a8c049cd6ce6aef4695d22c01d992d0.tar.bz2 |
#211015 follow-up by sun: Don't hard-code #theme for system_settings_form().
Diffstat (limited to 'modules/system/system.module')
-rw-r--r-- | modules/system/system.module | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index 7398653ad..9ec9e942f 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -140,7 +140,6 @@ function system_theme() { ), 'system_settings_form' => array( 'render element' => 'form', - 'file' => 'system.admin.inc', ), 'confirm_form' => array( 'render element' => 'form', @@ -2455,7 +2454,10 @@ function system_settings_form($form, $automatic_defaults = TRUE) { drupal_set_message(t('The settings have not been saved because of the errors.'), 'error'); } $form['#submit'][] = 'system_settings_form_submit'; - $form['#theme'] = 'system_settings_form'; + // By default, render the form using theme_system_settings_form(). + if (!isset($form['#theme'])) { + $form['#theme'] = 'system_settings_form'; + } return $form; } @@ -3529,6 +3531,21 @@ function theme_confirm_form($variables) { } /** + * Theme function for the system settings form. + * + * By default this does not alter the appearance of a form at all, + * but is provided as a convenience for themers. + * + * @param $variables + * An associative array containing: + * - form: An associative array containing the structure of the form. + * @ingroup themeable + */ +function theme_system_settings_form($variables) { + return drupal_render_children($variables['form']); +} + +/** * Template variable preprocessor for contextual links. */ function system_preprocess(&$variables, $hook) { |