Skip to content

Commit e6f0951

Browse files
committed
task: AddCatalogPriceForm: show a currency
Fix #1388
1 parent 86959e0 commit e6f0951

File tree

1 file changed

+60
-12
lines changed

1 file changed

+60
-12
lines changed

src/main/frontend/src/components/AddCatalogPriceForm.js

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// IMPORTANT:
33
// You must update ResourceUrl.RESOURCES_VERSION each time whenever you're modified this file!
44
//
5-
// @todo #1342 AddCatalogPriceForm: show a currency
65

76
class AddCatalogPriceForm extends React.Component {
87
constructor(props) {
@@ -130,17 +129,66 @@ class AddCatalogPriceForm extends React.Component {
130129
{ this.props.l10n['t_price'] || 'Price' }
131130
</label>
132131
<div className="col-sm-6">
133-
<div className="row">
134-
<div className="col-xs-6">
135-
<input
136-
className="form-control"
137-
id="catalog-price"
138-
type="text"
139-
size="5"
140-
required="required"
141-
onChange={ this.handleChangePrice }/>
142-
</div>
143-
</div>
132+
{this.state.catalog==="michel" && <div className="col-xs-6 input-group">
133+
<span className="input-group-addon">&euro;</span>
134+
<input
135+
type="text"
136+
className="form-control js-with-tooltip"
137+
size="5"
138+
title="EUR"
139+
required="required"
140+
onChange={ this.handleChangePrice }/>
141+
</div>}
142+
{this.state.catalog==="scott" && <div className="col-xs-6 input-group">
143+
<span className="input-group-addon">$</span>
144+
<input
145+
type="text"
146+
className="form-control js-with-tooltip"
147+
size="5"
148+
title="USD"
149+
required="required"
150+
onChange={ this.handleChangePrice }/>
151+
</div>}
152+
{this.state.catalog==="yvert" && <div className="col-xs-6 input-group ">
153+
<span className="input-group-addon">&euro;</span>
154+
<input
155+
type="text"
156+
className="form-control js-with-tooltip"
157+
size="5"
158+
title="EUR"
159+
required="required"
160+
onChange={ this.handleChangePrice }/>
161+
</div>}
162+
{this.state.catalog==="gibbons" && <div className="col-xs-6 input-group">
163+
<span className="input-group-addon">&pound;</span>
164+
<input
165+
type="text"
166+
className="form-control js-with-tooltip"
167+
size="5"
168+
title="GBP"
169+
required="required"
170+
onChange={ this.handleChangePrice }/>
171+
</div>}
172+
{this.state.catalog==="solovyov" && <div className="col-xs-6 input-group">
173+
<span className="input-group-addon">&#x20bd;</span>
174+
<input
175+
type="text"
176+
className="form-control js-with-tooltip"
177+
size="5"
178+
title="RUB"
179+
required="required"
180+
onChange={ this.handleChangePrice }/>
181+
</div>}
182+
{this.state.catalog==="zagorski" && <div className="col-xs-6 input-group">
183+
<span className="input-group-addon">&#x20bd;</span>
184+
<input
185+
type="text"
186+
className="form-control"
187+
size="5"
188+
title="RUB"
189+
required="required"
190+
onChange={ this.handleChangePrice }/>
191+
</div>}
144192
</div>
145193
</div>
146194
<div className="col-sm-offset-3 col-sm-4">

0 commit comments

Comments
 (0)