Ghost/ghost/admin/app/components/editor/modals/re-authenticate.hbs
Kevin Ansfield 332dd4fbf1 Switched editor re-authenticate modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
- simplified unauthed save behaviour because we now have a promise for the modal enabling us to wait for the modal to close before continuing
2022-11-14 09:55:34 +00:00

37 lines
1.5 KiB
Handlebars

<div class="modal-content" data-test-modal="re-authenticate">
<header class="modal-header">
<h1>Please re-authenticate</h1>
</header>
<button type="button" class="close" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
<div class="modal-body {{if this.authenticationError 'error'}}">
<form id="login" class="login-form" method="post" novalidate="novalidate" {{on "submit" (perform this.reauthenticateTask)}}>
<GhValidationStatusContainer @class="password-wrap" @errors={{this.signup.errors}} @property="password" @hasValidated={{this.signup.hasValidated}}>
<input
type="password"
class="gh-input password"
placeholder="Password"
name="password"
value={{this.signup.password}}
aria-label="Your password"
{{on "input" this.setPassword}}
/>
</GhValidationStatusContainer>
<div>
<GhTaskButton
@type="submit"
@buttonText="Log in"
@runningText="Authenticating"
@showSuccess={{false}}
@task={{this.reauthenticateTask}}
@class="gh-btn gh-btn-black gh-btn-icon"
/>
</div>
</form>
{{#if this.authenticationError}}
<p class="response">{{this.authenticationError}}</p>
{{/if}}
</div>
</div>