Skip to content

Commit

Permalink
lib/onoff: Don't write boolean attribute values into DOM
Browse files Browse the repository at this point in the history
They must be strings.  The "enabled" attribute does not seem to have
any effect anyway, the actual disabling happens with the <label>
elements.

Closes #10007
  • Loading branch information
mvollmer authored and martinpitt committed Sep 6, 2018
1 parent 8940cce commit a82f25c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lib/cockpit-components-onoff.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var OnOffSwitch = React.createClass({
}
var clickHandler = this.handleOnOffClick.bind(this, !this.props.state);
return (
<div className="btn-group btn-onoff-ct" enabled={this.props.enabled}>
<div className="btn-group btn-onoff-ct">
<label className={ onClasses.join(" ") }>
<input type="radio" />
<span onClick={clickHandler}>{this.props.captionOn}</span>
Expand Down

0 comments on commit a82f25c

Please sign in to comment.