diff --git a/internal/view/layout/base.templ b/internal/view/layout/base.templ index 6d2bb09..99d7576 100644 --- a/internal/view/layout/base.templ +++ b/internal/view/layout/base.templ @@ -11,6 +11,7 @@ templ BaseLayout() { +
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("RentEase | Your Property Management System
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/view/login_form.templ b/internal/view/login_form.templ index e69e070..9463d4b 100644 --- a/internal/view/login_form.templ +++ b/internal/view/login_form.templ @@ -12,16 +12,38 @@ func isFormError(data map[string]string, key string) bool { } templ LoginForm(lfvm LoginFormViewModel) { -
- - + + if msg, ok := lfvm.Errors["credentials"]; ok { Authentication error: { msg } } + + Password is too short Registration is disabled. Please ask an admin to activate it.
diff --git a/internal/view/login_form_templ.go b/internal/view/login_form_templ.go index 7dbd59a..a8cf523 100644 --- a/internal/view/login_form_templ.go +++ b/internal/view/login_form_templ.go @@ -34,14 +34,14 @@ func LoginForm(lfvm LoginFormViewModel) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var3 string - templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(lfvm.Password) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/view/login_form.templ`, Line: 19, Col: 62} + if msg, ok := lfvm.Errors["credentials"]; ok { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Authentication error: ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(msg) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/view/login_form.templ`, Line: 30, Col: 37} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - if msg, ok := lfvm.Errors["credentials"]; ok { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Authentication error: ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var4 string - templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(msg) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/view/login_form.templ`, Line: 23, Col: 37} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Registration is disabled. Please ask an admin to activate it.
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" autocomplete=\"password\" required @input.debounce=\"passwordTooShort = $event.target.value.length < 4\" :aria-invalid=\"passwordTooShort\"> Password is too short Registration is disabled. Please ask an admin to activate it.") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }