2023-08-15 20:35:21 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
{{ define "title" -}}
|
|
|
|
{{( pgettext "Tax Details" "title" )}}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ define "content" -}}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/company.taxDetailsForm*/ -}}
|
|
|
|
<form data-hx-put="/admin/company">
|
|
|
|
<h2>{{( pgettext "Tax Details" "title" )}}</h2>
|
|
|
|
{{ CSRFInput }}
|
|
|
|
<fieldset>
|
|
|
|
{{ with .BusinessName -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Business Name" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required autocomplete="organization" minlength="2"
|
|
|
|
{{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .VATIN -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "VAT Number" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .TradeName -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Trade Name" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
{{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Phone -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Phone" "input")}}<br>
|
|
|
|
<input type="tel" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required autocomplete="tel" {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Email -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Email" "input")}}<br>
|
|
|
|
<input type="email" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required autocomplete="email" {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Web -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Business Name" "input")}}<br>
|
|
|
|
<input type="url" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
autocomplete="url" {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Address -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Address" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required autocomplete="address-line1" {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .City -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "City" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Province -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Province" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .PostalCode -}}
|
|
|
|
<label>
|
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
|
|
|
{{( pgettext "Postcode" "input")}}<br>
|
2023-08-15 20:35:21 +00:00
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required autocomplete="postal-code" {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Country -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Country" "input")}}<br>
|
|
|
|
<select name="{{ .Name }}"
|
|
|
|
required autocomplete="country"
|
|
|
|
{{ template "error-attrs" . }}>{{ template "list-options" . }}
|
|
|
|
</select><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
2023-10-14 19:59:36 +00:00
|
|
|
{{ with .RTCNumber -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "RTC number" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
2023-08-15 20:35:21 +00:00
|
|
|
{{ with .Currency -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Currency" "input")}}<br>
|
|
|
|
<select name="{{ .Name }}"
|
|
|
|
required
|
|
|
|
{{ template "error-attrs" . }}>{{ template "list-options" . }}
|
|
|
|
</select><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .DefaultLanguage -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Default Language" "input")}}<br>
|
|
|
|
<select name="{{ .Name }}"
|
|
|
|
required
|
|
|
|
{{ template "error-attrs" . }}>{{ template "list-options" . }}
|
|
|
|
</select><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .InvoiceNumberFormat -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Invoice Number Format" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .LegalDisclaimer -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Legal Disclaimer" "input")}}<br>
|
|
|
|
<textarea name="{{ .Name }}"
|
|
|
|
{{ template "error-attrs" . }}>{{ .Val }}</textarea><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
</fieldset>
|
|
|
|
<footer>
|
|
|
|
<button type="submit">{{( pgettext "Save changes" "action" )}}</button>
|
|
|
|
</footer>
|
|
|
|
</form>
|
|
|
|
{{- end }}
|