Skip to content

Commit

Permalink
#464 add vat nr input, wire up select country to vat nr label
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Jul 2, 2018
1 parent bb0b771 commit dd9c523
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/webapp/WEB-INF/templates/event/reservation-page.ms
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,20 @@
</div>
{{/customerReferenceEnabled}}
</div>
<div class="row">
<div id="vat-number-container">
<div class="col-xs-12">
<div class="form-group {{#field-has-error}}[vatNr] has-error{{/field-has-error}}">
<label for="vatNr">{{#i18n}}invoice.vat [{{vatTranslation}}]{{/i18n}}</label>
<div class="input-group">
<div class="input-group-addon" id="selected-country-code"></div>
<input id="vatNr" type="text" name="vatNr" class="form-control" value="{{paymentForm.vatNr}}"/>
</div>
{{#field-has-error}}[vatNr]<span class="help-block text-danger">{{#i18n}}{{#field-error}}vatNr{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
</div>
</div>
</div>
</div>
{{/onlyInvoice}}
{{/invoiceIsAllowed}}
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/resources/js/event/reservation-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@
}
});

$("#vatCountry").change(function() {
$("#selected-country-code").text($("#vatCountry").val());
})

});

/*window.recaptchaLoadCallback = function() {
Expand Down

0 comments on commit dd9c523

Please sign in to comment.