Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Fix conflict between two select_one items with same name but differen…
Browse files Browse the repository at this point in the history
…t groups
  • Loading branch information
sgalsaleh committed Mar 5, 2020
1 parent 0c9aed0 commit 71b87c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions web/init/src/components/config_render/ConfigRadio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ export default class ConfigRadio extends React.Component {
const checked = val === this.props.name;

return (
<div className="flex-auto flex u-marginRight--20">
<div className="flex-auto flex alignItems--center u-marginRight--20">
<input
type="radio"
name={this.props.group}
id={this.props.name}
id={`${this.props.group}-${this.props.name}`}
value={this.props.name}
checked={checked}
disabled={this.props.readOnly}
onChange={(e) => this.handleOnChange(e)}
className={`${this.props.className || ""} flex-auto ${this.props.readOnly ? "readonly" : ""}`} />
<label htmlFor={this.props.name} className={`u-marginLeft--small header-color field-section-sub-header u-userSelect--none ${this.props.readOnly ? "u-cursor--default" : "u-cursor--pointer"}`}>{this.props.title}</label>
<label htmlFor={`${this.props.group}-${this.props.name}`} className={`u-marginLeft--small header-color field-section-sub-header u-userSelect--none ${this.props.readOnly ? "u-cursor--default" : "u-cursor--pointer"}`}>{this.props.title}</label>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion web/init/src/components/config_render/ConfigSelectOne.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class ConfigSelectOne extends React.Component {
/>
: null}
{this.props.help_text !== "" ? <p className="field-section-help-text u-marginTop--small u-lineHeight--normal">{this.props.help_text}</p> : null}
<div className="field-input-wrapper u-marginTop--15 flex flexWrap--wrap">
<div className="field-input-wrapper u-marginTop--15 flex alignItems--center flexWrap--wrap">
{options}
</div>
</div>
Expand Down

0 comments on commit 71b87c7

Please sign in to comment.