From ca00b8cf532bd93419e3f4bc46f9dde5caa90eec Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 8 Jan 2017 15:31:33 -0500 Subject: Display project exports in modal box --- assets/js/components/form-export.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 assets/js/components/form-export.js (limited to 'assets/js/components') 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(); + } +}); -- cgit v1.2.3