65 lines
2.5 KiB
Handlebars
65 lines
2.5 KiB
Handlebars
<div class="container password-reset clearfix">
|
|
<div class="pull-left col-image">
|
|
<img src={{lockImageUrl}} class="password-reset-img">
|
|
</div>
|
|
|
|
<div class="pull-left col-form">
|
|
{{#if successMessage}}
|
|
<p>{{successMessage}}</p>
|
|
|
|
{{#if requiresApproval}}
|
|
<p>{{i18n 'login.not_approved'}}</p>
|
|
{{else}}
|
|
{{#unless redirected}}
|
|
<a class="btn" href="{{redirectHref}}" {{action "done"}}>{{continueButtonText}}</a>
|
|
{{/unless}}
|
|
{{/if}}
|
|
{{else}}
|
|
<form>
|
|
{{#if securityKeyOrSecondFactorRequired }}
|
|
{{#if errorMessage}}
|
|
<div class='alert alert-error'>{{errorMessage}}</div>
|
|
<br>
|
|
{{/if}}
|
|
{{#if securityKeyRequired }}
|
|
{{#security-key-form
|
|
allowedCredentialIds=model.allowed_credential_ids
|
|
challenge=model.security_key_challenge
|
|
showSecurityKey=model.security_key_required
|
|
showSecondFactor=false
|
|
secondFactorMethod=secondFactorMethod
|
|
otherMethodAllowed=otherMethodAllowed
|
|
action=(action "authenticateSecurityKey")}}
|
|
{{/security-key-form}}
|
|
{{else}}
|
|
{{#second-factor-form
|
|
secondFactorMethod=secondFactorMethod
|
|
secondFactorToken=secondFactorToken
|
|
backupEnabled=backupEnabled
|
|
isLogin=false}}
|
|
{{second-factor-input value=secondFactorToken inputId='second-factor' secondFactorMethod=secondFactorMethod backupEnabled=backupEnabled}}
|
|
{{/second-factor-form}}
|
|
{{/if}}
|
|
{{#unless securityKeyRequired }}
|
|
{{d-button action=(action "submit") class='btn-primary' label='submit' type='submit'}}
|
|
{{/unless}}
|
|
{{else}}
|
|
<h2>{{i18n 'user.change_password.choose'}}</h2>
|
|
|
|
<div class="input">
|
|
{{password-field value=accountPassword type="password" id="new-account-password" capsLockOn=capsLockOn autofocus="autofocus"}}
|
|
{{input-tip validation=passwordValidation}}
|
|
</div>
|
|
|
|
<div class="instructions">
|
|
<div class="caps-lock-warning {{unless capsLockOn 'invisible'}}">
|
|
{{d-icon "exclamation-triangle"}} {{i18n 'login.caps_lock_warning'}}</div>
|
|
</div>
|
|
|
|
{{d-button action=(action "submit") class='btn-primary' label='user.change_password.set_password' type='submit'}}
|
|
{{/if}}
|
|
</form>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|