Verified Commit 894cf19d authored by Alexandre Goldstein's avatar Alexandre Goldstein
Browse files

Update logic to Disable/Enable Btn OK in modals

parent 323d7598
Pipeline #5459 passed with stages
in 12 minutes and 16 seconds
......@@ -51,8 +51,9 @@
</style>
<script>
// empty description / reference fields when the user press cancel
// empty description / reference fields / button state when the user press cancel
$("#cancelEdit").on('click', function () {
$('#save').prop("disabled",false);
ModificationModal.modal.find('input, textarea').val('');
});
......@@ -71,15 +72,16 @@
$("#retentionRuleFinalDisposition").prop("disabled",false);
}
});
$("#comment").bind('input propertychange', function () {
if ($("#comment").val() == "") {
$("#save").prop("disabled",true);
} else {
// On retourne l'état du bouton 'OK' en fonction de la saisie de l'utilisateur dans le champ 'commentaire'
$("#comment").on('change keyup', function () {
if ($("#comment").val() !== "") {
$("#save").prop("disabled",false);
}
else{
$("#save").prop("disabled",true);
}
});
$("#save").on('click', function (e) {
e.preventDefault();
ModificationModal.save();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment