summaryrefslogtreecommitdiff
path: root/public/js/forms.js
diff options
context:
space:
mode:
authorFelix Favre <gnomus@gnomus.de>2014-12-06 22:46:40 +0100
committerFelix Favre <gnomus@gnomus.de>2014-12-06 22:46:40 +0100
commit45ac884474753313b79e1f78934b18ae05253055 (patch)
tree887e478e002228c5e1828061f7885b160e4720cf /public/js/forms.js
parent921449f3efd2a7ba39009452dc4c4954109e221d (diff)
parenta48fd8fc37f75222a680e78c6ade8c41f02c3e6e (diff)
Merge branch 'master' of github.com:engelsystem/engelsystem
Diffstat (limited to 'public/js/forms.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;
+ });
+});