A little bit of helper javascript would improve usability quite a bit here:


(function ($) {

  /**
   * Custom behaviors for SwitchTheme.
   */
  Drupal.behaviors.switchTheme = {
    attach: function (context) {

      // Hide the submit button, and trigger form submit when new theme is
      // selected from drop-down.
      $('.switchtheme-switch-form', context).once('autosubmit', function () {
        $('.form-actions', $(this)).hide();
        $('.form-select', $(this)).change(function () {
          this.form.submit();
        });
      });

    }
  };

})(jQuery);

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwilson3’s picture

Status: Active » Needs review
FileSize
1.14 KB