.bind( "reset.button", formResetHandler );
if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = this.element.propAttr( "disabled" );
+ this.options.disabled = !!this.element.propAttr( "disabled" );
+ } else {
+ this.element.propAttr( "disabled", this.options.disabled );
}
this._determineButtonType();
options.label = this.buttonElement.html();
}
- if ( this.element.is( ":disabled" ) ) {
- options.disabled = true;
- }
-
this.buttonElement
.addClass( baseClasses )
.attr( "role", "button" )