summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
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();
+ }
+});