Commit f98b4549 authored by Roman's avatar Roman

BRCD-1692 fix(ProductPriceOverred) - disable percentage value and radio in view mode

parent 5c9d24bf
......@@ -157,32 +157,40 @@ export default class PlanProduct extends Component {
{<ControlLabel>{`${pricingMethod} Pricing`}</ControlLabel>}
</FormGroup>
<FormGroup className="mb0">
<span style={{ display: 'inline-block', marginRight: 20 }}>
<Field
fieldType="radio"
value="no"
onChange={this.onChangeOverrideType}
name={`${item.get('key')}-override-type`}
label="Override with specific prices"
checked={!isPercentage}
/>
</span>
{ editable && (
<span style={{ display: 'inline-block', marginRight: 20 }}>
<Field
fieldType="radio"
value="no"
onChange={this.onChangeOverrideType}
name={`${item.get('key')}-override-type`}
label="Override with specific prices"
checked={!isPercentage}
/>
</span>
)}
<span style={{ display: 'inline-block' }}>
<Field
style={{ display: 'inline-block', marginRight: 10 }}
fieldType="radio"
value="percentage"
onChange={this.onChangeOverrideType}
name={`${item.get('key')}-override-type`}
label="Override by percentage of the original price"
checked={isPercentage}
/>
{ editable && (
<Field
style={{ display: 'inline-block', marginRight: 10 }}
fieldType="radio"
value="percentage"
onChange={this.onChangeOverrideType}
name={`${item.get('key')}-override-type`}
label="Override by percentage of the original price"
checked={isPercentage}
/>
)}
{isPercentage && !editable && (
<span>Original price overridden by: </span>
)}
{ isPercentage && (
<Field
style={{ display: 'inline-block', width: 115, verticalAlign: 'middle' }}
fieldType="number"
onChange={this.onChangePercentage}
value={percentage}
editable={editable}
suffix="%"
max={100}
min={0}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment