diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-08 15:31:33 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-08 15:31:33 -0500 |
commit | ca00b8cf532bd93419e3f4bc46f9dde5caa90eec (patch) | |
tree | c2c2ca9b795daed99b48d5c44841feb649dd1a56 /assets/js/components | |
parent | b3a450bace8461fb7989d5406b9d9ec644d7df4a (diff) |
Display project exports in modal box
Diffstat (limited to 'assets/js/components')
-rw-r--r-- | assets/js/components/form-export.js | 9 |
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(); + } +}); |