* do things like add javascript to the page output. This should all
* be combined and served in the page HEAD. */
Horde::startBuffer();
+ Horde::addScriptFile('prefs.js', 'horde');
if ($this->group) {
if ($identities) {
--- /dev/null
+/**
+ * Provides the javascript for the prefs page.
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ */
+
+document.observe('dom:loaded', function() {
+ $('appsubmit').hide();
+
+ $('app').observe('change', function() {
+ $('appswitch').submit();
+ });
+});
<tag:forminput />
<div class="header">
<span class="smallheader rightFloat">
- <select id="app" name="app" onchange="document.appswitch.submit();">
+ <select id="app" name="app">
<option value=""><gettext>Edit Options for</gettext>:</option>
<if:horde>
<option value="" disabled="disabled">- - - - - - - - -</option>
<option value="<tag:apps.v />"><tag:apps.l /></option>
</loop:apps>
</select>
- <input class="button" type="submit" onclick="return document.appswitch.app.selectedIndex != 0;" value="<gettext>Go</gettext>" />
+ <input class="button" type="submit" id="appsubmit" value="<gettext>Go</gettext>" />
</span>
<span class="rightFloat prefsAdvanced">
<if:advanced>