Ghost/ghost/admin/app/components/editor/modals/re-authenticate.hbs
Kevin Ansfield 9fd87f565d Migrated <GhValidationStatusContainer> to {{validation-status}} modifier
no issue

- moved logic from `<GhValidationStatusContainer>` to a new `validation-status` modifier
  - removes a usage of the `ValidationState` mixin
  - migrated uses of the component to a mixin
  - paves the way for full removal of the `ValidationState` mixin in later refactors (mixins are deprecated)
- migrated `<GhFormGroup>` to a glimmer component
  - swapped the extend of `GhValidationStatusContainer` to usage of the `validation-status` modifier with a template-only component
  - updated all `<GhFormGroup>` to use the standard `class=""` instead of `@classNames=""` and `@class=""`
  - allows `data-test-*` attributes to be added to uses of `<FormGroup>` to help when complex components are grouped as a form input
2022-12-09 12:38:35 +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)}}>
<div class="password-wrap" {{validation-status 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}}
/>
</div>
<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>