2023-10-27 14:04:43 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
{{ define "title" -}}
|
|
|
|
{{( pgettext "Payment Settings" "title" )}}
|
|
|
|
{{- end }}
|
|
|
|
|
2024-01-21 21:44:04 +00:00
|
|
|
{{ define "breadcrumb" -}}
|
2024-02-14 03:54:42 +00:00
|
|
|
<li><a href="./">{{( pgettext "Payments" "title" )}}</a></li>
|
2024-01-21 21:44:04 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2023-10-27 14:04:43 +00:00
|
|
|
{{ define "content" -}}
|
2024-02-14 03:54:42 +00:00
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/payment.settingsForm*/ -}}
|
|
|
|
<form data-hx-put="/admin/payments/settings">
|
|
|
|
<h2>{{ template "title" . }}</h2>
|
2023-10-27 14:04:43 +00:00
|
|
|
{{ CSRFInput }}
|
|
|
|
<fieldset>
|
|
|
|
{{ with .MerchantCode -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Merchant Code" "input")}}<br>
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
required minlength="9"
|
|
|
|
{{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .TerminalNumber -}}
|
|
|
|
<label>
|
|
|
|
{{( pgettext "Terminal Number" "input")}}<br>
|
|
|
|
<input type="number" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
min="1" max="999"
|
|
|
|
required {{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .EncryptKey -}}
|
|
|
|
<label>
|
|
|
|
{{ if $.MerchantCode.Val -}}
|
|
|
|
{{( pgettext "Merchant Key (only if must change it)" "input")}}<br>
|
|
|
|
{{- else -}}
|
|
|
|
{{( pgettext "Merchant Key" "input")}}<br>
|
|
|
|
{{- end }}
|
|
|
|
<input type="text" name="{{ .Name }}" value="{{ .Val }}"
|
|
|
|
{{ if not $.MerchantCode.Val }}required{{end }}
|
|
|
|
{{ template "error-attrs" . }}><br>
|
|
|
|
</label>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Environment -}}
|
|
|
|
<fieldset>
|
|
|
|
<legend>{{( pgettext "Environment" "title")}}</legend>
|
|
|
|
{{ template "radio-options" . }}
|
|
|
|
</fieldset>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Integration -}}
|
|
|
|
<fieldset>
|
|
|
|
<legend>{{( pgettext "Integration" "title")}}</legend>
|
|
|
|
{{ template "radio-options" . }}
|
|
|
|
</fieldset>
|
|
|
|
{{ template "error-message" . }}
|
|
|
|
{{- end }}
|
|
|
|
</fieldset>
|
|
|
|
<footer>
|
|
|
|
<button type="submit">{{( pgettext "Save changes" "action" )}}</button>
|
|
|
|
</footer>
|
|
|
|
</form>
|
|
|
|
{{- end }}
|