summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-08 15:31:33 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-08 15:31:33 -0500
commitca00b8cf532bd93419e3f4bc46f9dde5caa90eec (patch)
treec2c2ca9b795daed99b48d5c44841feb649dd1a56 /assets/js/components
parentb3a450bace8461fb7989d5406b9d9ec644d7df4a (diff)
Display project exports in modal box
Diffstat (limited to 'assets/js/components')
-rw-r--r--assets/js/components/form-export.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/assets/js/components/form-export.js b/assets/js/components/form-export.js
new file mode 100644
index 00000000..c46fede1
--- /dev/null
+++ b/assets/js/components/form-export.js
@@ -0,0 +1,9 @@
+KB.onClick('.js-form-export', function(e) {
+ var formElement = document.querySelector('#modal-content form');
+ var fromElement = formElement.querySelector('#form-from');
+ var toElement = formElement.querySelector('#form-to');
+
+ if (fromElement.value !== '' && toElement.value !== '') {
+ formElement.submit();
+ }
+});