Better way to control checkboxes using labels.

Signed-off-by: Alexei Yuzhakov <sibprogrammer@gmail.com>
This commit is contained in:
Alexei Yuzhakov 2016-05-24 21:26:49 +06:00
parent 2650894bf0
commit 1ffa76bbaf
2 changed files with 6 additions and 3 deletions

View File

@ -57,9 +57,9 @@ var ContainerSettingsAdvanced = React.createClass({
<div className="settings-section">
<h3>Advanced Options</h3>
<div className="checkboxes">
<p><input type="checkbox" checked={this.state.tty} onChange={this.handleChangeTty}/>Allocate a TTY for this container</p>
<p><input type="checkbox" checked={this.state.openStdin} onChange={this.handleChangeOpenStdin}/>Keep STDIN open even if not attached</p>
<p><input type="checkbox" checked={this.state.privileged} onChange={this.handleChangePrivileged}/>Privileged mode</p>
<p><label><input type="checkbox" checked={this.state.tty} onChange={this.handleChangeTty}/>Allocate a TTY for this container</label></p>
<p><label><input type="checkbox" checked={this.state.openStdin} onChange={this.handleChangeOpenStdin}/>Keep STDIN open even if not attached</label></p>
<p><label><input type="checkbox" checked={this.state.privileged} onChange={this.handleChangePrivileged}/>Privileged mode</label></p>
</div>
<a className="btn btn-action" disabled={this.props.container.State.Updating} onClick={this.handleSaveAdvancedOptions}>Save</a>
</div>

View File

@ -166,6 +166,9 @@
input[type="checkbox"] {
margin-right: 0.8rem;
}
label {
font-weight: 400;
}
}
}
}