numerus/web/template/contacts/new.gohtml

55 lines
2.0 KiB
Plaintext

{{ define "title" -}}
{{( pgettext "New Contact" "title" )}}
{{- end }}
{{ define "breadcrumbs" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.contactForm*/ -}}
<nav data-hx-target="main" data-hx-boost="true">
<p>
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
<a href="{{ companyURI "/contacts"}}">{{( pgettext "Contacts" "title" )}}</a> /
<a>{{( pgettext "New Contact" "title" )}}</a>
</p>
</nav>
{{- end }}
{{ define "content" }}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.contactForm*/ -}}
<section id="new-contact-dialog-content" data-hx-target="main">
<h2>{{(pgettext "New Contact" "title")}}</h2>
<form method="POST" action="{{ companyURI "/contacts" }}" data-hx-boost="true">
{{ csrfToken }}
<fieldset class="contact-data">
{{ template "input-field" .Name | addInputAttr "autofocus" }}
{{ template "input-field" .Phone }}
{{ template "input-field" .Email }}
{{ template "input-field" .Web }}
{{ template "tags-field" .Tags }}
</fieldset>
<fieldset class="contact-data">
{{ template "input-field" .IBAN }}
{{ template "input-field" .BIC }}
</fieldset>
{{ template "check-field" .HasTaxDetails }}
<fieldset class="contact-data contact-tax-details">
{{ template "input-field" .BusinessName }}
{{ template "input-field" .VATIN }}
{{ template "input-field" .Address }}
{{ template "input-field" .City }}
{{ template "input-field" .Province }}
{{ template "input-field" .PostalCode }}
{{ template "select-field" .Country }}
</fieldset>
<fieldset>
<button formnovalidate class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>
</section>
{{- end }}