projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Close button on view user in user management dashboard" into projects
[osm/UI.git]
/
skyquake
/
framework
/
widgets
/
form_controls
/
input.jsx
diff --git
a/skyquake/framework/widgets/form_controls/input.jsx
b/skyquake/framework/widgets/form_controls/input.jsx
index
370afcc
..
d605614
100644
(file)
--- a/
skyquake/framework/widgets/form_controls/input.jsx
+++ b/
skyquake/framework/widgets/form_controls/input.jsx
@@
-17,7
+17,7
@@
*/
import './formControls.scss';
import SelectOption from 'widgets/form_controls/selectOption.jsx';
*/
import './formControls.scss';
import SelectOption from 'widgets/form_controls/selectOption.jsx';
-
+import CircleSVG from '../../../node_modules/open-iconic/svg/media-record.svg'
import React, {Component} from 'react';
export default class Input extends Component {
import React, {Component} from 'react';
export default class Input extends Component {
@@
-71,6
+71,9
@@
export default class Input extends Component {
} else {
displayedValue = value.toString();
}
} else {
displayedValue = value.toString();
}
+ if( props.readonly && props.type == "checkbox" && props.checked ) {
+ displayedValue = <img src={CircleSVG} />
+ }
let html = (
<label className={className} style={props.style}>
<span> { label } {isRequired}</span>
let html = (
<label className={className} style={props.style}>
<span> { label } {isRequired}</span>
@@
-94,10
+97,12
@@
function buildRadioButtons(props) {
<div className={className}>
{
props.options.map((o,i) => {
<div className={className}>
{
props.options.map((o,i) => {
+ let label = o.label || o;
+ let value = o.value || o;
return (
<label key={i}>
return (
<label key={i}>
- {
o.
label}
- <input type="radio" checked={props.value ==
o.value} value={o.
value} onChange={props.onChange} />
+ {label}
+ <input type="radio" checked={props.value ==
value} value={
value} onChange={props.onChange} />
</label>
)
})
</label>
)
})