changeset 189:bc0d7a5d7b8e

Make class code selection list to autosubmit via javascript if scripts are enabled, while also hiding the separate "change"-button if so. This makes the controls a bit more less crowded.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 13 Jan 2016 08:18:22 +0200
parents 658422c83b49
children 23fb0797f448
files index.php
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/index.php	Wed Jan 13 08:17:10 2016 +0200
+++ b/index.php	Wed Jan 13 08:18:22 2016 +0200
@@ -632,7 +632,7 @@
   " <table>\n".
   "  <tr>\n".
   "   <th>\n".
-  "    <select name=\"class\">\n";
+  "    <select id=\"classSelect\" name=\"class\" onChange=\"this.form.submit();\">\n";
 
 if ($classIDs !== FALSE)
 {
@@ -647,7 +647,7 @@
 echo 
   "    </select>\n".
   "   </th>\n".
-  "   <th><input class=\"submit\" type=\"submit\" value=\"".cmQM("change")."\" /></th>\n";
+  "   <noscript><th><input id=\"classSwitch\" class=\"submit\" type=\"submit\" value=\"".cmQM("change")."\" /></th></noscript>\n";
 
 if (!$mobileMode)
 {