mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-23 08:40:32 +00:00
fix(login): custom texts for pages called directly form mail link (#4415)
* fix(login): translate init password correctly * refactor: no error return params * fix(login): custom texts for pages called directly form mail link * fix custom text on registration pages Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
This commit is contained in:
@@ -90,9 +90,8 @@ func (l *Login) renderRegisterOrg(w http.ResponseWriter, r *http.Request, authRe
|
||||
baseData: l.getBaseData(r, authRequest, "Register", errID, errMessage),
|
||||
registerOrgFormData: *formData,
|
||||
}
|
||||
pwPolicy, description, _ := l.getPasswordComplexityPolicy(r, authRequest, "0")
|
||||
pwPolicy := l.getPasswordComplexityPolicy(r, "0")
|
||||
if pwPolicy != nil {
|
||||
data.PasswordPolicyDescription = description
|
||||
data.MinLength = pwPolicy.MinLength
|
||||
if pwPolicy.HasUppercase {
|
||||
data.HasUppercase = UpperCaseRegex
|
||||
@@ -114,6 +113,9 @@ func (l *Login) renderRegisterOrg(w http.ResponseWriter, r *http.Request, authRe
|
||||
}
|
||||
|
||||
translator := l.getTranslator(r.Context(), authRequest)
|
||||
if authRequest == nil {
|
||||
l.customTexts(r.Context(), translator, "")
|
||||
}
|
||||
l.renderer.RenderTemplate(w, r, translator, l.renderer.Templates[tmplRegisterOrg], data, nil)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user