Skip to content

Commit c0aac50

Browse files
committed
update resource version
1 parent e651d64 commit c0aac50

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

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

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@ class AddCatalogPriceForm extends React.Component {
3232
});
3333
}
3434

35+
getCurrencyByCatalogName(catalog) {
36+
switch (catalog) {
37+
case 'michel':
38+
case 'yvert':
39+
return ['\u20AC', 'EUR'];
40+
break;
41+
case 'scott':
42+
return ['$', 'USD'];
43+
break;
44+
case 'gibbons':
45+
return ['\u00A3', 'GBP'];
46+
break;
47+
case 'solovyov':
48+
case 'zagorski':
49+
return ['\u20BD', 'RUB'];
50+
break;
51+
}
52+
}
53+
3554
handleSubmit(event) {
3655
event.preventDefault();
3756

@@ -85,30 +104,8 @@ class AddCatalogPriceForm extends React.Component {
85104
}
86105
render() {
87106
const hasValidationErrors = this.state.validationErrors.length > 0;
88-
let currency;
89-
let title;
107+
const [currencySymbol, currencyName] = this.getCurrencyByCatalogName(this.state.catalog);
90108

91-
switch (this.state.catalog) {
92-
case 'michel':
93-
case 'yvert':
94-
currency = '\u20AC';
95-
title = 'EUR';
96-
break;
97-
case 'scott':
98-
currency = '$';
99-
title = 'USD';
100-
break;
101-
case 'gibbons':
102-
currency = '\u00A3';
103-
title = 'GBP';
104-
break;
105-
case 'solovyov':
106-
case 'zagorski':
107-
currency = '\u20BD';
108-
title =' RUB';
109-
break;
110-
}
111-
112109
return (
113110
<div className="col-sm-12 form-group">
114111
<form className={`form-horizontal ${hasValidationErrors ? 'has-error' : ''}`} onSubmit={this.handleSubmit}>
@@ -151,17 +148,19 @@ class AddCatalogPriceForm extends React.Component {
151148
<div className="form-group form-group-sm">
152149
<label className="control-label col-sm-3">
153150
{ this.props.l10n['t_price'] || 'Price' }
154-
</label>
155-
<div className="col-sm-6">
156-
<div className="col-xs-6 input-group">
157-
<span className="input-group-addon">{ currency }</span>
158-
<input
151+
</label>
152+
<div className="row">
153+
<div className="col-sm-6">
154+
<div className="col-xs-6 input-group">
155+
<span className="input-group-addon">{ currencySymbol }</span>
156+
<input
159157
type="text"
160158
className="form-control js-with-tooltip"
161159
size="5"
162-
title={ title }
160+
title={ currencyName }
163161
required="required"
164162
onChange={ this.handleChangePrice }/>
163+
</div>
165164
</div>
166165
</div>
167166
</div>

src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class ResourceUrl {
3232
public static final String STATIC_RESOURCES_URL = "https://stamps.filezz.ru";
3333

3434
// MUST be updated when any of our resources were modified
35-
public static final String RESOURCES_VERSION = "v0.4.3.2";
35+
public static final String RESOURCES_VERSION = "v0.4.3.3";
3636

3737
// CheckStyle: ignore LineLength for next 14 lines
3838
private static final String CATALOG_UTILS_JS = "/public/js/" + RESOURCES_VERSION + "/CatalogUtils.min.js";

0 commit comments

Comments
 (0)