Skip to content

Commit

Permalink
#464 initial work for mandatory invoice ui/ux
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Jul 2, 2018
1 parent 9343b0e commit ef7b44f
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 34 deletions.
6 changes: 5 additions & 1 deletion src/main/resources/alfio/i18n/public.properties
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,8 @@ error.STEP_2_EMPTY_BILLING_ADDRESS=Billing address is mandatory
common.customer-reference=Purchase Order (PO) / Internal Reference
error.STEP_2_INVALID_VAT=The VAT Number is not valid. Please check the input parameter.
error.vatVIESDown=An error occurred contacting the EU VIES vat checker. Please try again.
common.back=Back
common.back=Back
reservation-page.address-line-1=Address Line 1
reservation-page.address-line-2=Address Line 2
reservation-page.zip-postal-code=Zip/Postal Code
reservation-page.city=City
4 changes: 4 additions & 0 deletions src/main/resources/alfio/i18n/public_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,7 @@ error.STEP_2_INVALID_VAT=Die MWST-Nummer ist nicht g\u00FCltig. Bitte pr\u00FCfe
error.vatVIESDown=[DE] An error occurred contacting the EU VIES vat checker. Please try again.
breadcrumb.step4=[DE]-Thank You
common.back=[DE]-Back
reservation-page.address-line-1=[DE]-Address Line 1
reservation-page.address-line-2=[DE]-Address Line 2
reservation-page.zip-postal-code=[DE]-Zip/Postal Code
reservation-page.city=[DE]-City
6 changes: 5 additions & 1 deletion src/main/resources/alfio/i18n/public_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,8 @@ reservation.add-company-billing-details=Achat en tant qu''entreprise (requis le
error.STEP_2_INVALID_VAT=Le Nr. TVA n''est pas valide. V\u00E9rifiez le param\u00E8tre entr\u00E9.
error.vatVIESDown=[FR] An error occurred contacting the EU VIES vat checker. Please try again.
breadcrumb.step4=[FR]-Thank You
common.back=[FR]-Back
common.back=[FR]-Back
reservation-page.address-line-1=[FR]-Address Line 1
reservation-page.address-line-2=[FR]-Address Line 2
reservation-page.zip-postal-code=[FR]-Zip/Postal Code
reservation-page.city=[FR]-City
4 changes: 4 additions & 0 deletions src/main/resources/alfio/i18n/public_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,7 @@ error.STEP_2_INVALID_VAT=Il numero IVA immesso non risulta valido.
error.vatVIESDown=[IT] An error occurred contacting the EU VIES vat checker. Please try again.
breadcrumb.step4=[IT]-Thank You
common.back=[IT]-Back
reservation-page.address-line-1=[IT]-Address Line 1
reservation-page.address-line-2=[IT]-Address Line 2
reservation-page.zip-postal-code=[IT]-Zip/Postal Code
reservation-page.city=[IT]-City
4 changes: 4 additions & 0 deletions src/main/resources/alfio/i18n/public_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,7 @@ error.STEP_2_INVALID_VAT=Uw BTW nummer is niet geldig. Check nogmaals of uw BTW
error.vatVIESDown=[NL] An error occurred contacting the EU VIES vat checker. Please try again.
breadcrumb.step4=[NL]-Thank You
common.back=[NL]-Back
reservation-page.address-line-1=[NL]-Address Line 1
reservation-page.address-line-2=[NL]-Address Line 2
reservation-page.zip-postal-code=[NL]-Zip/Postal Code
reservation-page.city=[NL]-City
126 changes: 94 additions & 32 deletions src/main/webapp/WEB-INF/templates/event/reservation-page.ms
Original file line number Diff line number Diff line change
Expand Up @@ -85,47 +85,109 @@
<div class="page-header">
<h2>{{#i18n}}reservation-page.your-details{{/i18n}}</h2>
</div>
{{#useFirstAndLastName}}
<div class="row">
<div class="col-xs-12 col-sm-6">
<div class="form-group {{#field-has-error}}[firstName] has-error{{/field-has-error}}">
<label for="first-name" class="control-label">{{#i18n}}common.first-name{{/i18n}}</label>
<input type="text" name="firstName" id="first-name" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="fname" maxlength="255" value="{{paymentForm.firstName}}">
{{#field-has-error}}[firstName]<span class="help-block text-danger">{{#i18n}}{{#field-error}}firstName{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group {{#field-has-error}}[billingAddressCompany] has-error{{/field-has-error}}">
<label for="billingAddressCompany">{{#i18n}}reservation-page-complete.company{{/i18n}}</label>
<input id="billingAddressCompany" name="billingAddressCompany" class="form-control" type="text" value="{{paymentForm.billingAddressCompany}}" maxlength="255" placeholder="if applicable">
{{#field-has-error}}[billingAddressCompany]<span class="help-block text-danger">{{#i18n}}{{#field-error}}billingAddressCompany{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
<div class="col-xs-12 col-sm-6">
<div class="form-group {{#field-has-error}}[lastName] has-error{{/field-has-error}}">
<label for="last-name" class="control-label">{{#i18n}}common.last-name{{/i18n}}</label>
<input type="text" name="lastName" id="last-name" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="lname" maxlength="255" value="{{paymentForm.lastName}}">
{{#field-has-error}}[lastName]<span class="help-block text-danger">{{#i18n}}{{#field-error}}lastName{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
</div>
</div>


{{#useFirstAndLastName}}
<div class="row">
<div class="col-xs-12 col-sm-6">
<div class="form-group {{#field-has-error}}[firstName] has-error{{/field-has-error}}">
<label for="first-name" class="control-label">{{#i18n}}common.first-name{{/i18n}}</label>
<input type="text" name="firstName" id="first-name" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="fname" maxlength="255" value="{{paymentForm.firstName}}">
{{#field-has-error}}[firstName]<span class="help-block text-danger">{{#i18n}}{{#field-error}}firstName{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
</div>
{{/useFirstAndLastName}}
{{^useFirstAndLastName}}
<div class="form-group {{#field-has-error}}[fullName] has-error{{/field-has-error}}">
<label for="full-name" class="control-label">{{#i18n}}common.full-name{{/i18n}}</label>
<input type="text" name="fullName" id="full-name" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="name" maxlength="255" value="{{paymentForm.fullName}}">
{{#field-has-error}}[fullName]<span class="help-block text-danger">{{#i18n}}{{#field-error}}fullName{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
<div class="col-xs-12 col-sm-6">
<div class="form-group {{#field-has-error}}[lastName] has-error{{/field-has-error}}">
<label for="last-name" class="control-label">{{#i18n}}common.last-name{{/i18n}}</label>
<input type="text" name="lastName" id="last-name" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="lname" maxlength="255" value="{{paymentForm.lastName}}">
{{#field-has-error}}[lastName]<span class="help-block text-danger">{{#i18n}}{{#field-error}}lastName{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
</div>
{{/useFirstAndLastName}}
</div>
{{/useFirstAndLastName}}
{{^useFirstAndLastName}}
<div class="form-group {{#field-has-error}}[fullName] has-error{{/field-has-error}}">
<label for="full-name" class="control-label">{{#i18n}}common.full-name{{/i18n}}</label>
<input type="text" name="fullName" id="full-name" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="name" maxlength="255" value="{{paymentForm.fullName}}">
{{#field-has-error}}[fullName]<span class="help-block text-danger">{{#i18n}}{{#field-error}}fullName{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
{{/useFirstAndLastName}}


<div class="row">
<div class="col-xs-12 {{#captchaRequestedFreeOfCharge}}col-md-6{{/captchaRequestedFreeOfCharge}}">
<div class="form-group {{#field-has-error}}[email] has-error{{/field-has-error}}">
<label for="email" class="control-label">{{#i18n}}common.email{{/i18n}}</label>
<input type="email" name="email" id="email" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="email" maxlength="255" value="{{paymentForm.email}}">
{{#field-has-error}}[email]<span class="help-block text-danger">{{#i18n}}{{#field-error}}email{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group {{#field-has-error}}[email] has-error{{/field-has-error}}">
<label for="email" class="control-label">{{#i18n}}common.email{{/i18n}}</label>
<input type="email" name="email" id="email" required class="form-control {{#attendeeAutocompleteEnabled}}autocomplete-src{{/attendeeAutocompleteEnabled}}" autocomplete="email" maxlength="255" value="{{paymentForm.email}}">
{{#field-has-error}}[email]<span class="help-block text-danger">{{#i18n}}{{#field-error}}email{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
{{#captchaRequestedFreeOfCharge}}
<div class="col-xs-12 col-md-6">
<div id="captcha-FREE" class="g-recaptcha" data-sitekey="{{recaptchaApiKey}}"></div>
</div>
</div>

<div class="row">
<div class="col-xs-12">
<div class="form-group {{#field-has-error}}[billingAddressLine1] has-error{{/field-has-error}}">
<label for="billingAddressLine1">{{#i18n}}reservation-page.address-line-1{{/i18n}}</label>
<input id="billingAddressLine1" name="billingAddressLine1" class="form-control" type="text" required value="{{paymentForm.billingAddressLine1}}" maxlength="255">
{{#field-has-error}}[billingAddressLine1]<span class="help-block text-danger">{{#i18n}}{{#field-error}}billingAddressLine1{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="billingAddressLine2">{{#i18n}}reservation-page.address-line-2{{/i18n}}</label>
<input id="billingAddressLine2" name="billingAddressLine2" class="form-control" type="text" value="{{paymentForm.billingAddressLine2}}" maxlength="255">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-3">
<div class="form-group {{#field-has-error}}[billingAddressZip] has-error{{/field-has-error}}">
<label for="billingAddressZip">{{#i18n}}reservation-page.zip-postal-code{{/i18n}}</label>
<input id="billingAddressZip" name="billingAddressZip" class="form-control" type="text" required value="{{paymentForm.billingAddressZip}}" maxlength="50">
{{#field-has-error}}[billingAddressZip]<span class="help-block text-danger">{{#i18n}}{{#field-error}}billingAddressZip{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
</div>
<div class="col-xs-12 col-md-9">
<div class="form-group {{#field-has-error}}[billingAddressCity] has-error{{/field-has-error}}">
<label for="billingAddressCity">{{#i18n}}reservation-page.city{{/i18n}}</label>
<input id="billingAddressCity" name="billingAddressCity" class="form-control" type="text" required value="{{paymentForm.billingAddressCity}}" maxlength="255">
{{#field-has-error}}[billingAddressCity]<span class="help-block text-danger">{{#i18n}}{{#field-error}}billingAddressCity{{/field-error}}{{/i18n}}</span>{{/field-has-error}}
</div>
{{/captchaRequestedFreeOfCharge}}
</div>
</div>
<div class="row">
<div class="col-xs-12 {{#customerReferenceEnabled}}col-md-6{{/customerReferenceEnabled}}">
<div class="form-group">
<label for="vatCountry">{{#i18n}}reservation-page-complete.country{{/i18n}}</label>

<select name="vatCountryCode" id="vatCountry" value="{{paymentForm.vatCountryCode}}" class="form-control field-required" required>
<option value="">{{#i18n}}reservation-page.country.select{{/i18n}}</option>
<optgroup label="{{#i18n}}reservation-page.eu-countries{{/i18n}}" id="optgroup-eu-countries-list">
{{#euCountriesForVat}}
<option value="{{left}}" data-description="{{right}}">{{left}} - {{right}}</option>
{{/euCountriesForVat}}
</optgroup>
<optgroup label="{{#i18n}}reservation-page.all-countries{{/i18n}}">
{{#countriesForVat}}
<option value="{{left}}" data-description="{{right}}">{{left}} - {{right}}</option>
{{/countriesForVat}}
</optgroup>
</select>
</div>

</div>
</div>

{{#customerReferenceEnabled}}
<div class="form-group {{#field-has-error}}[customerReference] has-error{{/field-has-error}}">
Expand Down

0 comments on commit ef7b44f

Please sign in to comment.