Added validation in edit and create

This commit is contained in:
Jeroen De Meerleer 2018-09-05 13:26:55 +02:00
parent d4155645c4
commit 67ab931f57
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
1 changed files with 7 additions and 5 deletions

View File

@ -45,9 +45,11 @@ $(document).ready(function() {
$("#ajax_loader").hide(); $("#ajax_loader").hide();
$('#resultmodal').modal('show'); $('#resultmodal').modal('show');
}); });
}); });
$("body").on("change", ".input[name=url]", function() { $("body").on("change", "input[name=url]", function() {
$(".label[for=expected]").html("Capture services after reboot? (1: yes; 0: no)"); if($("input[name=url]").val() == "reboot") {
$(".input[name=url]").attr("placeholder", "1"); $(".label[for=expected]").html("Capture services after reboot? (1: yes; 0: no)");
}) $("input[name=expected]").attr("placeholder", "1");
}
})
}); });