{{template "head" .View}} {{template "header" .View}}
{{template "page_header" (pageHeader .View "pages.tourRequest.title" "pages.tourRequest.description" "/static/images/pages/tours.jpg")}}
{{t .View "tourRequestForm.backToTours"}}
{{if .Submitted}}

{{if .EmailSent}}{{t .View "tourRequestForm.successTitleSent"}}{{else}}{{t .View "tourRequestForm.successTitle"}}{{end}}

{{if .EmailSent}}{{t .View "tourRequestForm.successBodySent"}}{{else}}{{t .View "tourRequestForm.successBody"}}{{end}}

{{if and .MailtoURL (not .EmailSent)}} {{t .View "tourRequestForm.sendEmailCta"}} {{t .View "tourRequestForm.backToTours"}} {{else}} {{t .View "tourRequestForm.backToTours"}} {{end}}
{{else}}

{{t .View "tourRequestForm.intro"}}

{{if .Errors}} {{end}}

{{t .View "tourRequestForm.step1Kicker"}}

{{t .View "tourRequestForm.tourDetailsTitle"}}
{{if index .Errors "institution"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}

{{t .View "tourRequestForm.institutionType"}}

{{range .InstitutionTypes}} {{end}}
{{if index .Errors "institution_type"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}
{{if index .Errors "institution_other"}}

{{t .View "tourRequestForm.otherRequired"}}

{{end}}
{{if index .Errors "age_range"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}

{{t .View "tourRequestForm.partySizeHint"}}

{{if index .Errors "party_size"}}

{{t .View "tourRequestForm.partySizeInvalid"}}

{{end}}
{{if index .Errors "representative"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}

{{t .View "tourRequestForm.tourDateHint"}}

{{if eq (index .Errors "tour_date") "required"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{else if index .Errors "tour_date"}}

{{t .View "tourRequestForm.tourDateInvalid"}}

{{end}}

{{t .View "tourRequestForm.step2Kicker"}}

{{t .View "tourRequestForm.contactTitle"}}

{{t .View "tourRequestForm.contactIntro"}}

{{if index .Errors "contact_name"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}
{{if index .Errors "contact_institution"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}
{{if index .Errors "address"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}
{{if index .Errors "telephone"}}

{{t .View "tourRequestForm.fieldRequired"}}

{{end}}
{{if index .Errors "email"}}

{{t .View "tourRequestForm.emailInvalid"}}

{{end}}

{{t .View "tourRequestForm.submitHint"}}

{{t .View "tourRequestForm.cancel"}}
{{end}}
{{template "footer" .View}} {{template "scripts" .View}} {{if not .Submitted}} {{end}}