Skip to content

AddCatalogPriceForm: show a currency #1388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
0pdd opened this issue May 9, 2020 · 1 comment · Fixed by #1391
Closed

AddCatalogPriceForm: show a currency #1388

0pdd opened this issue May 9, 2020 · 1 comment · Fixed by #1391
Assignees
Labels
Milestone

Comments

@0pdd
Copy link

0pdd commented May 9, 2020

The puzzle 1342-ddac07e5 from #1342 has to be resolved:

// @todo #1342 AddCatalogPriceForm: show a currency

The puzzle was created by Bakhodyr Kadyrov on 09-May-20.

@0pdd 0pdd added the techdebt label May 9, 2020
@php-coder php-coder added this to the 0.4.4 milestone May 9, 2020
@php-coder
Copy link
Owner

We should update markup and show a currency like on a series creation page:

<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${michelHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
<label for="michelNumbers" class="control-label col-sm-3" th:text="#{t_michel}">
Michel
</label>
<div class="col-sm-7">
<div class="row">
<div class="col-xs-6">
<input type="text" id="michelNumbers" class="form-control js-catalog-numbers" th:field="*{michelNumbers}" />
</div>
<div class="col-xs-3 no-padding">
<div class="input-group">
<span class="input-group-addon">&euro;</span>
<input type="text" class="form-control js-with-tooltip" size="5" title="EUR" th:field="*{michelPrice}" />
</div>
</div>
</div>
<!--/*/
<span id="michelNumbers.errors" class="help-block" th:if="${#fields.hasErrors('michelNumbers')}" th:each="error : ${#fields.errors('michelNumbers')}" th:text="${error}"></span>
<span id="michelPrice.errors" class="help-block" th:if="${#fields.hasErrors('michelPrice')}" th:each="error : ${#fields.errors('michelPrice')}" th:text="${error}"></span>
/*/-->
</div>
</div>
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${scottHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
<label for="scottNumbers" class="control-label col-sm-3" th:text="#{t_scott}">
Scott
</label>
<div class="col-sm-7">
<div class="row">
<div class="col-xs-6">
<input type="text" id="scottNumbers" class="form-control js-catalog-numbers" th:field="*{scottNumbers}" />
</div>
<div class="col-xs-3 no-padding">
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" class="form-control js-with-tooltip" size="5" title="USD" th:field="*{scottPrice}" />
</div>
</div>
</div>
<!--/*/
<span id="scottNumbers.errors" class="help-block" th:if="${#fields.hasErrors('scottNumbers')}" th:each="error : ${#fields.errors('scottNumbers')}" th:text="${error}"></span>
<span id="scottPrice.errors" class="help-block" th:if="${#fields.hasErrors('scottPrice')}" th:each="error : ${#fields.errors('scottPrice')}" th:text="${error}"></span>
/*/-->
</div>
</div>
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${yvertHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
<label for="yvertNumbers" class="control-label col-sm-3" th:text="#{t_yvert}">
Yvert et Tellier
</label>
<div class="col-sm-7">
<div class="row">
<div class="col-xs-6">
<input type="text" id="yvertNumbers" class="form-control js-catalog-numbers" th:field="*{yvertNumbers}" />
</div>
<div class="col-xs-3 no-padding">
<div class="input-group">
<span class="input-group-addon">&euro;</span>
<input type="text" class="form-control js-with-tooltip" size="5" title="EUR" th:field="*{yvertPrice}" />
</div>
</div>
</div>
<!--/*/
<span id="yvertNumbers.errors" class="help-block" th:if="${#fields.hasErrors('yvertNumbers')}" th:each="error : ${#fields.errors('yvertNumbers')}" th:text="${error}"></span>
<span id="yvertPrice.errors" class="help-block" th:if="${#fields.hasErrors('yvertPrice')}" th:each="error : ${#fields.errors('yvertPrice')}" th:text="${error}"></span>
/*/-->
</div>
</div>
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${gibbonsHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
<label for="gibbonsNumbers" class="control-label col-sm-3" th:text="#{t_sg}">
Stanley Gibbons
</label>
<div class="col-sm-7">
<div class="row">
<div class="col-xs-6">
<input type="text" id="gibbonsNumbers" class="form-control js-catalog-numbers" th:field="*{gibbonsNumbers}" />
</div>
<div class="col-xs-3 no-padding">
<div class="input-group">
<span class="input-group-addon">&pound;</span>
<input type="text" class="form-control js-with-tooltip" size="5" title="GBP" th:field="*{gibbonsPrice}" />
</div>
</div>
</div>
<!--/*/
<span id="gibbonsNumbers.errors" class="help-block" th:if="${#fields.hasErrors('gibbonsNumbers')}" th:each="error : ${#fields.errors('gibbonsNumbers')}" th:text="${error}"></span>
<span id="gibbonsPrice.errors" class="help-block" th:if="${#fields.hasErrors('gibbonsPrice')}" th:each="error : ${#fields.errors('gibbonsPrice')}" th:text="${error}"></span>
/*/-->
</div>
</div>
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${solovyovHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
<label for="solovyovNumbers" class="control-label col-sm-3" th:text="#{t_solovyov}">
Solovyov
</label>
<div class="col-sm-7">
<div class="row">
<div class="col-xs-6">
<input type="text" id="solovyovNumbers" class="form-control js-catalog-numbers" th:field="*{solovyovNumbers}" />
</div>
<div class="col-xs-3 no-padding">
<div class="input-group">
<span class="input-group-addon">&#x20bd;</span>
<input type="text" class="form-control js-with-tooltip" size="5" title="RUB" th:field="*{solovyovPrice}" />
</div>
</div>
</div>
<!--/*/
<span id="solovyovNumbers.errors" class="help-block" th:if="${#fields.hasErrors('solovyovNumbers')}" th:each="error : ${#fields.errors('solovyovNumbers')}" th:text="${error}"></span>
<span id="solovyovPrice.errors" class="help-block" th:if="${#fields.hasErrors('solovyovPrice')}" th:each="error : ${#fields.errors('solovyovPrice')}" th:text="${error}"></span>
/*/-->
</div>
</div>
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${zagorskiHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
<label for="zagorskiNumbers" class="control-label col-sm-3" th:text="#{t_zagorski}">
Zagorski
</label>
<div class="col-sm-7">
<div class="row">
<div class="col-xs-6">
<input type="text" id="zagorskiNumbers" class="form-control js-catalog-numbers" th:field="*{zagorskiNumbers}" />
</div>
<div class="col-xs-3 no-padding">
<div class="input-group">
<span class="input-group-addon">&#x20bd;</span>
<input type="text" class="form-control js-with-tooltip" size="5" title="RUB" th:field="*{zagorskiPrice}" />
</div>
</div>
</div>
<!--/*/
<span id="zagorskiNumbers.errors" class="help-block" th:if="${#fields.hasErrors('zagorskiNumbers')}" th:each="error : ${#fields.errors('zagorskiNumbers')}" th:text="${error}"></span>
<span id="zagorskiPrice.errors" class="help-block" th:if="${#fields.hasErrors('zagorskiPrice')}" th:each="error : ${#fields.errors('zagorskiPrice')}" th:text="${error}"></span>
/*/-->
</div>
</div>

In other words, when Michel catalog is chosen, currency should be EUR. For Scott it will be USD and so on.

@php-coder php-coder added the estimation/30m Estimated time: 30 minutes label May 11, 2020
bahoss added a commit to bahoss/mystamps that referenced this issue May 12, 2020
bahoss added a commit to bahoss/mystamps that referenced this issue May 12, 2020
bahoss added a commit to bahoss/mystamps that referenced this issue May 14, 2020
bahoss added a commit to bahoss/mystamps that referenced this issue May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants