Created
January 24, 2017 05:11
-
-
Save asifsaho/7b53d4d102725b2a6f36797dacf12808 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('form.claim-details input, form select, form textarea').each(function () { | |
this.backup = this.value; | |
}); | |
$('form.claim-details').on('change keyup', 'input,select,textarea', function () { | |
if (this.value !== this.backup) { | |
this.backup = this.value; | |
this.form.isDirty = true; | |
//$(this).addClass('field-dirty'); | |
//$(this.form).addClass('form-dirty'); | |
//console.log('form is dirty'); | |
var msisdn = $('#id_object_id').text().trim(), | |
accountNo = $('#id_account_number').val(); | |
if (msisdn === accountNo) $('#save-changes-btn').removeAttr('disabled'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment