view/forgot_password.html
Rama main · réplica de lectura del repositorio original.
{{define "content"}}
<div class="auth-card">
{{template "logo" .}}
<h1 class="auth-title">{{.ThemeTitle}}</h1>
{{if eq .Mode "sent"}}
{{if .Error}}
<div class="auth-error" role="alert">{{.Error}}</div>
{{else}}
<p class="auth-text">If an account with that {{if eq .ProfileFieldEmail "is_username"}}email{{else}}username or email{{end}} exists, we've sent a password reset link.</p>
<p class="auth-text">Check your inbox and click the link to continue.</p>
{{end}}
<a class="auth-btn" href="{{authURL "/authorize"}}?client_id={{.ClientID}}&redirect_uri={{.RedirectURI}}&state={{.State}}&scope={{.Scope}}&response_type=code&nonce={{.Nonce}}&code_challenge={{.CodeChallenge}}&code_challenge_method={{.CodeChallengeMethod}}&prompt={{.LoginPrompt}}&max_age={{.MaxAge}}">Back to login</a>
{{else}}
<p class="auth-text-muted">Enter your {{if eq .ProfileFieldEmail "is_username"}}email{{else}}username or email{{end}} and we'll send you a link to reset your password. Alternatively, contact your administrator.</p>
{{if .Error}}
<div class="auth-error" role="alert">{{.Error}}</div>
{{end}}
<form method="POST" action="{{authURL "/forgot-password"}}" style="width:100%">
{{ .csrfField }}
<input type="hidden" name="redirect_uri" value="{{.RedirectURI}}" />
<input type="hidden" name="state" value="{{.State}}" />
<input type="hidden" name="client_id" value="{{.ClientID}}" />
<input type="hidden" name="scope" value="{{.Scope}}" />
<input type="hidden" name="nonce" value="{{.Nonce}}" />
<input type="hidden" name="code_challenge" value="{{.CodeChallenge}}" />
<input type="hidden" name="code_challenge_method" value="{{.CodeChallengeMethod}}" />
<input type="hidden" name="prompt" value="{{.Prompt}}" />
<input type="hidden" name="max_age" value="{{.MaxAge}}" />
<div class="auth-field">
{{if eq .ProfileFieldEmail "is_username"}}
<label class="auth-label" for="identifier">Email</label>
<input class="auth-input" type="email" id="identifier" name="identifier" required autocomplete="email" />
{{else}}
<label class="auth-label" for="identifier">Username or Email</label>
<input class="auth-input" type="text" id="identifier" name="identifier" required autocomplete="username" />
{{end}}
</div>
<button class="auth-btn" type="submit">Send reset link</button>
<div class="auth-link" style="margin-top:15px;"><a href="{{authURL "/authorize"}}?client_id={{.ClientID}}&redirect_uri={{.RedirectURI}}&state={{.State}}&scope={{.Scope}}&response_type=code&nonce={{.Nonce}}&code_challenge={{.CodeChallenge}}&code_challenge_method={{.CodeChallengeMethod}}&prompt={{.LoginPrompt}}&max_age={{.MaxAge}}">Back to login</a></div>
</form>
{{end}}
</div>
{{end}}