summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/forms.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/public/js/forms.js b/public/js/forms.js
index 630d8c25..a8c7f6ce 100644
--- a/public/js/forms.js
+++ b/public/js/forms.js
@@ -1,8 +1,8 @@
function check_all(id) {
var obj = document.getElementById(id);
var boxes = obj.getElementsByTagName("input");
- for(var i = 0; i < boxes.length; i++) {
- if(boxes[i].type == "checkbox" && !boxes[i].disabled)
+ for ( var i = 0; i < boxes.length; i++) {
+ if (boxes[i].type == "checkbox" && !boxes[i].disabled)
boxes[i].checked = true;
}
}
@@ -10,8 +10,15 @@ function check_all(id) {
function uncheck_all(id) {
var obj = document.getElementById(id);
var boxes = obj.getElementsByTagName("input");
- for(var i = 0; i < boxes.length; i++) {
- if(boxes[i].type == "checkbox")
+ for ( var i = 0; i < boxes.length; i++) {
+ if (boxes[i].type == "checkbox")
boxes[i].checked = false;
}
}
+
+$(function() {
+ $('form').submit(function(ev) {
+ $('input[type="submit"]').prop("readonly", true).addClass("disabled");
+ return true;
+ });
+});