check open/unvalidated rows on save

This commit is contained in:
Luis Aleixo 2022-03-15 16:37:44 +00:00
parent ebad26fa8b
commit e40120b1bd

View file

@ -881,7 +881,7 @@ $(document).ready(function () {
// Validate row button (Save button)
$("body").on("click", ".validate_node_btn_frm_field", function() {
let index = $(this).attr('id').split('_').slice(-1)[0];
var index = $(this).attr('id').split('_').slice(-1)[0];
let activity = validate_sr_parameter('#sr_activity_no_' + String(index)[0], "Required input.");
let start = validate_sr_parameter('#sr_start_no_' + String(index)[0], "Required input.");
let duration = validate_sr_parameter('#sr_duration_no_' + String(index)[0], "Required input.");
@ -896,6 +896,11 @@ $(document).ready(function () {
index = index + 1;
}
}
$(".validate_node_btn_frm_field").not(".row_validated").not(this).each(function( index ) {
index = $(this).attr('id').split('_').slice(-1)[0];
if ($('#sr_start_no_' + String(index)[0]).val() != "") validate_sr_parameter('#sr_start_no_' + String(index)[0], "Required input.");
if ($('#sr_duration_no_' + String(index)[0]).val() != "") validate_sr_parameter('#sr_duration_no_' + String(index)[0], "Required input.");
});
});
//Edit short range activity type