Open flightsurvey opened 6 years ago
@flightsurvey add this code to validator.js
Line 294:
Validator.prototype.toggleSubmit = function () {
if (!this.options.disable) return
this.$btn.toggleClass('disabled', this.isIncomplete() || this.hasErrors())
// add this line
this.$btn.attr('disabled', this.isIncomplete() || this.hasErrors())
}
Line 327:
this.$btn.removeClass('disabled')
// and this
this.$btn.prop('disabled', false)
This needs a PR! Been banging my head against the wall for an hour trying to understand this.
Adding this to the validator.js works well for me but the div below disappear
<div class="help-block with-errors"></div>
When the OK button is disabled because validation tests have failed it shows as disabled but can still be clicked on.