projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow enable/disable on create. Enabled=>Status header
[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
1563f29
..
9b5e685
100644
(file)
--- a/
skyquake/framework/widgets/form_controls/input.jsx
+++ b/
skyquake/framework/widgets/form_controls/input.jsx
@@
-74,6
+74,11
@@
export default class Input extends Component {
if( props.readonly && props.type == "checkbox" && props.checked ) {
displayedValue = <img src={CircleSVG} />
}
if( props.readonly && props.type == "checkbox" && props.checked ) {
displayedValue = <img src={CircleSVG} />
}
+
+ if( props.readonly && props.type == "radiogroup" && props.readonlydisplay ) {
+ displayedValue = props.readonlydisplay
+ }
+
let html = (
<label className={className} style={props.style}>
<span> { label } {isRequired}</span>
let html = (
<label className={className} style={props.style}>
<span> { label } {isRequired}</span>
@@
-97,10
+102,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>
)
})