numerus/web/template/contacts/edit.gohtml

46 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-02-03 12:29:10 +00:00
{{ define "title" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editContactPage*/ -}}
{{printf (pgettext "Edit Contact “%s”" "title") .ContactName }}
2023-02-03 12:29:10 +00:00
{{- end }}
{{ define "breadcrumbs" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editContactPage*/ -}}
2023-02-03 12:58:10 +00:00
<nav>
<p>
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
<a href="{{ companyURI "/contacts"}}">{{( pgettext "Contacts" "title" )}}</a> /
<a>{{ .ContactName }}</a>
2023-02-03 12:58:10 +00:00
</p>
</nav>
{{- end }}
{{ define "content" }}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editContactPage*/ -}}
<section class="dialog-content" id="edit-contact-dialog-content" data-hx-target="this">
<h2>{{printf (pgettext "Edit Contact “%s”" "title") .ContactName }}</h2>
<form method="POST" action="{{ companyURI "/contacts/" }}{{ .Slug }}" data-hx-boost="true" data-hx-select="#edit-contact-dialog-content">
2023-02-03 12:29:10 +00:00
{{ csrfToken }}
{{ putMethod }}
2023-02-03 12:58:10 +00:00
{{ with .Form }}
{{ template "input-field" .BusinessName }}
{{ template "input-field" .VATIN }}
{{ template "input-field" .TradeName }}
{{ template "input-field" .Phone }}
{{ template "input-field" .Email }}
{{ template "input-field" .Web }}
{{ template "input-field" .Address | addInputAttr `class="width-2x"` }}
{{ template "input-field" .City }}
{{ template "input-field" .Province }}
{{ template "input-field" .PostalCode }}
{{ template "select-field" .Country | addSelectAttr `class="width-fixed"` }}
{{ template "tags-field" .Tags }}
{{ end }}
2023-02-03 12:29:10 +00:00
<fieldset>
2023-02-03 12:58:10 +00:00
<button class="primary" type="submit">{{( pgettext "Update contact" "action" )}}</button>
2023-02-03 12:29:10 +00:00
</fieldset>
</form>
</section>
{{- end }}