1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-08-10 22:41:25 +02:00

Completed implimentation of forgot password

This commit is contained in:
Lee Brown
2019-08-02 15:03:32 -08:00
parent 1d69ea88a3
commit c625ace88d
40 changed files with 1861 additions and 37 deletions

View File

@@ -99,7 +99,7 @@
</html>
{{end}}
{{ define "invalid-feedback" }}
<div class="invalid-feedback">
<div class="invalid-feedback" data-field="{{ .fieldName }}">
{{ if ValidationErrorHasField .validationErrors .fieldName }}
{{ range $verr := (ValidationFieldErrors .validationErrors .fieldName) }}{{ $verr.Display }}<br/>{{ end }}
{{ else }}
@@ -127,4 +127,21 @@
</div>
{{ end }}
{{ end }}
{{ end }}
{{ define "validation-error" }}
{{ if .validationErrors }}
{{ $errMsg := (ErrorMessage $._Ctx .validationErrors) }}
{{ if $errMsg }}
<div class="alert alert-danger validation-error" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> {{ if $errMsg }}<h3>{{ $errMsg }}</h3> {{end}}
{{ if .validationErrors.Fields }}
<ul>
{{ range $i := .validationErrors.Fields }}
<li data-form-field="{{ $i.FormField }}">{{ if $i.Display }}{{ $i.Display }}{{ else }}{{ $i.Error }}{{ end }}</li>
{{end}}
</ul>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ end }}