Ghost/ghost/admin/app/templates/reset.hbs
Kevin Ansfield 717e89113c Refactored reset controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to full native class syntax
- swapped use of `<GhTextInput>` in favor of native `<input>` and removed use of `{{action}}` in associated template
2022-10-07 19:07:51 +01:00

46 lines
2.2 KiB
Handlebars

<div class="gh-flow">
<div class="gh-flow-content-wrap">
<section class="gh-flow-content fade-in">
<form id="reset" class="gh-signin" method="post" novalidate="novalidate" {{on "submit" (perform this.resetPasswordTask)}}>
<header>
<div class="gh-site-icon" style={{site-icon-style}}></div>
<h1>Reset your password.</h1>
</header>
<GhFormGroup @errors={{this.errors}} @hasValidated={{this.hasValidated}} @property="newPassword">
<span class="gh-input-icon gh-icon-lock">
<input
type="password"
name="newPassword"
placeholder="New password"
aria-label="New password"
class="gh-input password reset-password"
autocorrect="off"
value={{this.newPassword}}
{{autofocus}}
{{on "input" this.handleInput}}
/>
</span>
</GhFormGroup>
<GhFormGroup @errors={{this.errors}} @hasValidated={{this.hasValidated}} @property="ne2Password">
<span class="gh-input-icon gh-icon-lock">
<input
type="password"
name="ne2Password"
placeholder="Confirm new password"
aria-label="Confirm new password"
class="gh-input password reset-password"
autocorrect="off"
value={{this.ne2Password}}
{{on "input" this.handleInput}}
/>
</span>
</GhFormGroup>
<GhTaskButton @buttonText="Save new password" @task={{this.resetPasswordTask}} @class="gh-btn gh-btn-reset gh-btn-block gh-btn-icon" @type="submit" @autoWidth="false" />
</form>
<p class="main-error">{{this.flowErrors}}&nbsp;</p>
</section>
</div>
</div>