summaryrefslogtreecommitdiff
path: root/misc/form.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/form.js')
-rw-r--r--misc/form.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/form.js b/misc/form.js
new file mode 100644
index 000000000..f5e3e6846
--- /dev/null
+++ b/misc/form.js
@@ -0,0 +1,10 @@
+// $Id$
+
+Drupal.behaviors.multiselectSelector = function() {
+ // Automatically selects the right radio button in a multiselect control.
+ $('.multiselect select:not(.multiselectSelector-processed)')
+ .addClass('multiselectSelector-processed').change(function() {
+ $('.multiselect input:radio[value="'+ this.id.substr(5) +'"]')
+ .attr('checked', true);
+ });
+};