mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-03 11:42:17 +00:00
feat: Custom text login (#1925)
* feat: default custom message text * feat: org custom message text * feat: org custom message text * feat: custom messages query side * feat: default messages * feat: message text user fields * feat: check for inactive user * feat: fix send password reset * feat: fix custom org text * feat: add variables to docs * feat: custom text tests * feat: fix notifications * feat: add custom text feature * feat: add custom text feature * feat: feature in custom message texts * feat: add custom text feature in frontend * feat: merge main * feat: feature tests * feat: change phone message in setup * fix: remove unused code, add event translation * fix: merge main and fix problems * fix: english translation file * fix: migration versions * fix: setup * fix: custom login text * feat: add all possible custom texts for login * feat: iam login texts * feat: org login texts * feat: protos * fix: custom text in admin api * fix: add success login text * fix: docs * fix: add custom login texts to management api * fix: add sub messages to custom login texts * fix: setup custom texts * feat: get org login texts * feat: get org login texts * feat: handler in adminapi * feat: handlers in auth and admin * feat: render login texts * feat: custom login text * feat: add all login text keys * feat: handle correct login texts * feat: custom login texts in command side * feat: custom login texts in command side * feat: fix yaml file * feat: merge master and add confirmation text * feat: fix html * feat: read default login texts * feat: get default text files * feat: get custom texts org * feat: tests * feat: change translator handling * fix translator from authReq * feat: change h1 on login screens * feat: add custom login text for remove * feat: add custom login text for remove * feat: cache translation files * feat: cache translation files * feat: zitadel user in env var * feat: add registration user description * feat: better func naming * feat: tests * feat: add mutex to read file * feat: add mutex to read file * fix mutex for accessing translation map * fix: translation key Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
{{template "main-top" .}}
|
||||
|
||||
<div class="lgn-head">
|
||||
<h1>{{t "Registration.Title"}}</h1>
|
||||
<p>{{t "Registration.Description"}}</p>
|
||||
<h1>{{t "RegistrationUser.Title"}}</h1>
|
||||
|
||||
{{if .OrgRegister}}
|
||||
<p>{{t "RegistrationUser.DescriptionOrgRegister"}}</p>
|
||||
{{ else}}
|
||||
<p>{{t "RegistrationUser.Description"}}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -16,25 +21,25 @@
|
||||
|
||||
<div class="double-col">
|
||||
<div class="lgn-field">
|
||||
<label class="lgn-label" for="firstname">{{t "Registration.Firstname"}}</label>
|
||||
<label class="lgn-label" for="firstname">{{t "RegistrationUser.FirstnameLabel"}}</label>
|
||||
<input class="lgn-input" type="text" id="firstname" name="firstname" autocomplete="given-name"
|
||||
value="{{ .Firstname }}" autofocus required>
|
||||
</div>
|
||||
<div class="lgn-field">
|
||||
<label class="lgn-label" for="lastname">{{t "Registration.Lastname"}}</label>
|
||||
<label class="lgn-label" for="lastname">{{t "RegistrationUser.LastnameLabel"}}</label>
|
||||
<input class="lgn-input" type="text" id="lastname" name="lastname" autocomplete="family-name"
|
||||
value="{{ .Lastname }}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lgn-field double">
|
||||
<label class="lgn-label" for="email">{{t "Registration.Email"}}</label>
|
||||
<label class="lgn-label" for="email">{{t "RegistrationUser.EmailLabel"}}</label>
|
||||
<input class="lgn-input" type="text" id="email" name="email" autocomplete="email" value="{{ .Email }}" required>
|
||||
</div>
|
||||
|
||||
{{if .ShowUsername}}
|
||||
<div class="lgn-field double">
|
||||
<label class="lgn-label" for="email">{{t "Registration.Username"}}</label>
|
||||
<label class="lgn-label" for="email">{{t "RegistrationUser.UsernameLabel"}}</label>
|
||||
<div class="lgn-suffix-wrapper">
|
||||
<input class="lgn-input lgn-suffix-input" type="text" id="username" name="username" autocomplete="email" value="{{ .Email }}" required>
|
||||
{{if .DisplayLoginNameSuffix}}
|
||||
@@ -46,27 +51,27 @@
|
||||
|
||||
<div class="double-col">
|
||||
<div class="lgn-field">
|
||||
<label class="lgn-label" for="languages">{{t "Registration.Language"}}</label>
|
||||
<label class="lgn-label" for="languages">{{t "RegistrationUser.LanguageLabel"}}</label>
|
||||
<select id="languages" name="language">
|
||||
<option value=""></option>
|
||||
<option value="de" id="de" {{if (selectedLanguage "de")}} selected {{end}}>{{t "Registration.German"}}
|
||||
<option value="de" id="de" {{if (selectedLanguage "de")}} selected {{end}}>{{t "RegistrationUser.German"}}
|
||||
</option>
|
||||
<option value="en" id="en" {{if (selectedLanguage "en")}} selected {{end}}>{{t "Registration.English"}}
|
||||
<option value="en" id="en" {{if (selectedLanguage "en")}} selected {{end}}>{{t "RegistrationUser.English"}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="lgn-field" >
|
||||
<label class="lgn-label" for="genders">
|
||||
{{t "Registration.Gender"}}
|
||||
{{t "RegistrationUser.GenderLabel"}}
|
||||
<span class="optional">{{t "optional"}}</span>
|
||||
</label>
|
||||
<select id="genders" name="gender">
|
||||
<option value=""></option>
|
||||
<option value="1" id="female" {{if (selectedGender 1)}} selected {{end}}>{{t "Registration.Female"}}
|
||||
<option value="1" id="female" {{if (selectedGender 1)}} selected {{end}}>{{t "RegistrationUser.Female"}}
|
||||
</option>
|
||||
<option value="2" id="male" {{if (selectedGender 2)}} selected {{end}}>{{t "Registration.Male"}}
|
||||
<option value="2" id="male" {{if (selectedGender 2)}} selected {{end}}>{{t "RegistrationUser.Male"}}
|
||||
</option>
|
||||
<option value="3" id="diverse" {{if (selectedGender 3)}} selected {{end}}>{{t "Registration.Diverse"}}
|
||||
<option value="3" id="diverse" {{if (selectedGender 3)}} selected {{end}}>{{t "RegistrationUser.Diverse"}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -74,14 +79,14 @@
|
||||
|
||||
<div class="double-col">
|
||||
<div class="lgn-field">
|
||||
<label class="lgn-label" for="register-password">{{t "Registration.Password"}}</label>
|
||||
<label class="lgn-label" for="register-password">{{t "RegistrationUser.PasswordLabel"}}</label>
|
||||
<input data-minlength="{{ .MinLength }}" data-has-uppercase="{{ .HasUppercase }}"
|
||||
data-has-lowercase="{{ .HasLowercase }}" data-has-number="{{ .HasNumber }}"
|
||||
data-has-symbol="{{ .HasSymbol }}" class="lgn-input" type="password" id="register-password"
|
||||
name="register-password" autocomplete="new-password" required>
|
||||
</div>
|
||||
<div class="lgn-field">
|
||||
<label class="lgn-label" for="register-password-confirmation">{{t "Registration.Password2"}}</label>
|
||||
<label class="lgn-label" for="register-password-confirmation">{{t "RegistrationUser.PasswordConfirmLabel"}}</label>
|
||||
<input class="lgn-input" type="password" id="register-password-confirmation"
|
||||
name="register-password-confirmation" autocomplete="new-password" required>
|
||||
</div>
|
||||
@@ -93,23 +98,23 @@
|
||||
|
||||
{{ if or .TOSLink .PrivacyLink }}
|
||||
<div class="lgn-field">
|
||||
<label class="lgn-label">{{t "Registration.TosAndPrivacy"}}</label>
|
||||
<label class="lgn-label">{{t "RegistrationUser.TosAndPrivacy"}}</label>
|
||||
<div class="lgn-checkbox">
|
||||
<input type="checkbox" id="register-term-confirmation"
|
||||
name="register-term-confirmation" required>
|
||||
<label for="register-term-confirmation">
|
||||
{{t "Registration.TosConfirm"}}
|
||||
{{t "RegistrationUser.TosConfirm"}}
|
||||
{{ if .TOSLink }}
|
||||
<a class="tos-link" target="_blank" href="{{ .TOSLink }}" rel="noopener noreferrer">
|
||||
{{t "Registration.TosLinkText"}}
|
||||
{{t "RegistrationUser.TosLinkText"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{ if and .TOSLink .PrivacyLink }}
|
||||
{{t "Registration.TosConfirmAnd"}}
|
||||
{{t "RegistrationUser.TosConfirmAnd"}}
|
||||
{{ end }}
|
||||
{{ if .PrivacyLink }}
|
||||
<a class="tos-link" target="_blank" href="{{ .PrivacyLink}}" rel="noopener noreferrer">
|
||||
{{t "Registration.PrivacyLinkText"}}
|
||||
{{t "RegistrationUser.PrivacyLinkText"}}
|
||||
</a>
|
||||
{{end}}
|
||||
</label>
|
||||
@@ -122,10 +127,10 @@
|
||||
|
||||
<div class="lgn-actions">
|
||||
<a class="lgn-stroked-button lgn-primary" href="{{ loginNameChangeUrl .AuthReqID }}">
|
||||
{{t "Actions.Back"}}
|
||||
{{t "RegistrationUser.BackButtonText"}}
|
||||
</a>
|
||||
<span class="fill-space"></span>
|
||||
<button class="lgn-raised-button lgn-primary" id="register-button" type="submit">{{t "Actions.Next"}}</button>
|
||||
<button class="lgn-raised-button lgn-primary" id="register-button" type="submit">{{t "RegistrationUser.NextButtonText"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user