--- switchtheme.module 2008-11-02 05:32:56.000000000 -0800
+++ switchtheme.module 2009-02-14 02:14:52.000000000 -0800
@@ -117,7 +117,7 @@ function switchtheme_block($op = 'list',
}
elseif ($delta == 0 && $op == 'view' && user_access('switch theme')) {
$block['subject'] = t('Theme');
- $block['content'] = drupal_get_form('switchtheme_switch_form');
+ $block['content'] = drupal_get_form('switchtheme_switch_form') .'
';
return $block;
}
elseif ($delta == 1 && $op == 'view' && user_access('switch theme')) {
@@ -150,10 +150,9 @@ function switchtheme_switch_form() {
$form['theme'] = array(
'#type' => 'select',
'#default_value' => !empty($custom_theme) ? $custom_theme : $user->theme,
- '#attributes' => array('title' => t('Change the way this site looks.')),
+ '#attributes' => array('title' => t('Change the way this site looks.'), 'onChange' => 'this.form.submit()'),
'#options' => switchtheme_select()
);
- $form['submit'] = array('#id'=>'switchtheme-submit', '#type' => 'submit', '#value' => t('Switch'));
return $form;
}