camper/web/templates/admin/booking/guest.gohtml

140 lines
4.6 KiB
Plaintext
Raw Normal View History

{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/booking.guestForm*/ -}}
<fieldset>
<button type="button"
onclick="this.closest('fieldset').remove(this);return false;"
><span class="sr-only">{{( pgettext "Remove" "action" )}}</span></button>
{{ with .IDDocumentNumber -}}
<label>
{{( pgettext "ID document number" "input" )}}<br>
<input type="text"
required
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .IDDocumentType -}}
<label>
{{( pgettext "ID document type" "input" )}}<br>
<select name="{{ .Name }}"
required
{{ template "error-attrs" . }}
>
<option value="">{{( gettext "Choose an ID document type" )}}</option>
{{ template "list-options" . }}
</select><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .IDDocumentDate -}}
<label>
{{( pgettext "ID document issue date (if any)" "input" )}}<br>
<input type="date"
max="{{ today }}"
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .FirstSurname -}}
<label>
{{( pgettext "First surname" "input" )}}<br>
<input type="text"
required
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .SecondSurname -}}
<label>
{{( pgettext "Second surname (if has one)" "input" )}}<br>
<input type="text"
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .GivenName -}}
<label>
{{( pgettext "Given name" "input" )}}<br>
<input type="text"
required
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .Sex -}}
<label>
{{( pgettext "Sex" "input" )}}<br>
<select name="{{ .Name }}"
required
{{ template "error-attrs" . }}
>
<option value="">{{( gettext "Choose a sex" )}}</option>
{{ template "list-options" . }}
</select><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .Birthdate -}}
<label>
{{( pgettext "Birthdate" "input" )}}<br>
<input type="date"
required
max="{{ today }}"
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .Country -}}
<label>
{{( pgettext "Nationality" "input" )}}<br>
<select name="{{ .Name }}"
required
{{ template "error-attrs" . }}
>
<option value="">{{( gettext "Choose a country" )}}</option>
{{ template "list-options" . }}
</select><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .Phone -}}
<label>
{{( pgettext "Phone (optional)" "input" )}}<br>
<input type="tel"
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
{{ with .Address -}}
<label>
{{( pgettext "Address (optional)" "input" )}}<br>
<input type="text"
name="{{ .Name }}"
value="{{ .Val }}"
{{ template "error-attrs" . }}
><br>
{{ template "error-message" . }}
</label>
{{- end }}
</fieldset>