summaryrefslogtreecommitdiff
path: root/src/main/webapp/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/js')
-rw-r--r--src/main/webapp/js/test_acknowledgments.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/webapp/js/test_acknowledgments.js b/src/main/webapp/js/test_acknowledgments.js
index 8c5d837..da47870 100644
--- a/src/main/webapp/js/test_acknowledgments.js
+++ b/src/main/webapp/js/test_acknowledgments.js
@@ -151,6 +151,18 @@
* @param note (String) The note in the acknowledgment.
*/
function saveCallback(ack, modal, key, test, branchSet, deviceSet, testCaseSet, note) {
+ var allEmpty = true;
+ var firstUnemptyInput = null;
+ var vals = modal.find('.modal-section>.input-container>input').each(function(_, input) {
+ if (!!$(input).val()) {
+ allEmpty = false;
+ if (!firstUnemptyInput) firstUnemptyInput = $(input);
+ }
+ });
+ if (!allEmpty) {
+ firstUnemptyInput.focus();
+ return false;
+ }
var branches = Array.from(branchSet);
branches.sort();
var devices = Array.from(deviceSet);