aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/static/base.js
diff options
context:
space:
mode:
authorMitch Riedstra <Mitch@riedstra.us>2017-10-30 17:06:23 -0400
committerMitch Riedstra <Mitch@riedstra.us>2017-10-30 17:06:23 -0400
commitec9428fdf76b5d70d0f3bcdff3b85e3a83d5f3d5 (patch)
tree6ae862656a003d683f537d078599f98bbfa2675d /app/dispatch/static/base.js
parent1949503b55ea622d7c466e4b433f4d90e7eff125 (diff)
downloaddispatch-tracker-ec9428fdf76b5d70d0f3bcdff3b85e3a83d5f3d5.tar.gz
dispatch-tracker-ec9428fdf76b5d70d0f3bcdff3b85e3a83d5f3d5.tar.xz
Proper redirect on edit for users. Delete for loads, warning on delete. Invoice view ordered by PK desc
Diffstat (limited to 'app/dispatch/static/base.js')
-rw-r--r--app/dispatch/static/base.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/dispatch/static/base.js b/app/dispatch/static/base.js
index 5f57441..a0f2493 100644
--- a/app/dispatch/static/base.js
+++ b/app/dispatch/static/base.js
@@ -1,3 +1,10 @@
+function warn_submit(text, form) {
+ if(confirm(text)) {
+ form = document.querySelector(form)
+ form.submit()
+ }
+}
+
$( document ).ready(function(){
all_date_fields = document.querySelectorAll("[name='date']");