Custom checkbox
This commit is contained in:
@@ -36,10 +36,15 @@ export default connect(null, mapDispatchToProps)(props => {
|
||||
let data;
|
||||
switch (props.template.type) {
|
||||
case "bool":
|
||||
data = <input checked={JSON.parse(props.value)}
|
||||
disabled={props.readOnly}
|
||||
onChange={e=>handleChanged(e)}
|
||||
type={'checkbox'}/>;
|
||||
data = (
|
||||
<label className='CheckBoxOwner'>
|
||||
<input checked={JSON.parse(props.value)}
|
||||
disabled={props.readOnly}
|
||||
onChange={e=>handleChanged(e)}
|
||||
type='checkbox'/>
|
||||
<span className='CheckMark'/>
|
||||
</label>
|
||||
);
|
||||
break;
|
||||
|
||||
case "double":
|
||||
|
||||
@@ -125,9 +125,13 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
||||
colSpan={28}
|
||||
row={secondRow}
|
||||
rowSpan={7}>
|
||||
<input checked={props.PState.AutoMount}
|
||||
onChange={handleAutoMountChanged}
|
||||
type='checkbox'/>Auto-mount
|
||||
<label className='CheckBoxOwner'>Auto-mount
|
||||
<input checked={props.PState.AutoMount}
|
||||
id={'checkbox_am_' + props.provider}
|
||||
onChange={handleAutoMountChanged}
|
||||
type='checkbox'/>
|
||||
<span className='CheckMark'/>
|
||||
</label>
|
||||
</RootElem>
|
||||
);
|
||||
|
||||
@@ -136,9 +140,13 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
||||
colSpan={24}
|
||||
row={secondRow}
|
||||
rowSpan={7}>
|
||||
<input checked={props.PState.AutoRestart}
|
||||
onChange={handleAutoRestartChanged}
|
||||
type='checkbox'/>Restart
|
||||
<label className='CheckBoxOwner'>Restart
|
||||
<input checked={props.PState.AutoRestart}
|
||||
id={'checkbox_ar_' + props.provider}
|
||||
onChange={handleAutoRestartChanged}
|
||||
type='checkbox'/>
|
||||
<span className='CheckMark'/>
|
||||
</label>
|
||||
</RootElem>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user