aboutsummaryrefslogtreecommitdiff
path: root/budget/static/ihatemoney/custom.js
diff options
context:
space:
mode:
Diffstat (limited to 'budget/static/ihatemoney/custom.js')
-rw-r--r--budget/static/ihatemoney/custom.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/budget/static/ihatemoney/custom.js b/budget/static/ihatemoney/custom.js
new file mode 100644
index 0000000..6a813b9
--- /dev/null
+++ b/budget/static/ihatemoney/custom.js
@@ -0,0 +1,17 @@
+ // Add a script to select all or non of the checkboxes in the add_bill form
+ function toggle()
+ {
+ var els = document.getElementsByName('payed_for');
+ for(var i =0;i<els.length;i++)
+ {
+ if(document.getElementById('toggleField').checked)
+ {
+ els[i].checked=true;
+ }
+ else
+ {
+ els[i].checked=false;
+ }
+ }
+ }
+