2019-03-15 17:38:54 +03:00
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
2020-05-28 19:11:21 +03:00
<a class="close" href role="button" title="Close" {{ action "closeModal" }} {{ action ( optional this .noop ) on = "mouseDown" }} >
2019-03-15 17:38:54 +03:00
{{ svg-jar "close" }} <span class="hidden">Close</span>
</a>
2015-11-18 13:50:48 +03:00
2022-01-18 14:28:46 +03:00
<div class="gh-modal-invite-user">
<header class="modal-header" data-test-modal="invite-staff-user">
<h1>Invite a new staff user</h1>
<p>Send an invitation for a new person to create a staff account on your site, and select a role that matches what you’ d like them to be able to do.</p>
</header>
2015-11-18 13:50:48 +03:00
2022-01-18 14:28:46 +03:00
<div class="modal-body">
<fieldset>
<GhFormGroup @errors= {{ this .errors }} @hasValidated= {{ this .hasValidated }} @property="email">
<label for="new-user-email">Email address</label>
<GhTextInput
@class="email"
@id="new-user-email"
@type="email"
@placeholder="youremail@example.com"
@name="email"
@shouldFocus= {{ true }}
@autocapitalize="off"
@autocorrect="off"
2022-02-02 20:09:02 +03:00
@value= {{ readonly this .email }}
@input= {{ action ( mut this .email ) value = "target.value" }}
2022-01-18 14:28:46 +03:00
@keyEvents= {{ hash
Enter=(action "confirm")
}}
/>
<GhErrorMessage @errors= {{ this .errors }} @property="email" />
</GhFormGroup>
2015-11-18 13:50:48 +03:00
2022-01-18 14:28:46 +03:00
<GhRoleSelection
@selected= {{ this .role }}
@setRole= {{ this .setRole }}
@onValidationSuccess= {{ action "roleValidationSucceeded" }}
@onValidationFailure= {{ action "roleValidationFailed" }}
/>
</fieldset>
</div>
<div class="modal-footer">
{{ # if this .limitErrorMessage }}
<GhTaskButton @buttonText="Upgrade my plan →"
@task= {{ this .transitionToBilling }}
@class="gh-btn gh-btn-green gh-btn-icon"
@disableMouseDown="true"
data-test-button="upgrade-my-plan" />
{{ else }}
<GhTaskButton @buttonText="Send invitation now →"
@successText="Sent"
@task= {{ this .sendInvitation }}
@class="gh-btn gh-btn-black gh-btn-icon"
@disabled= {{ this .fetchRoles .isRunning }}
@disableMouseDown="true"
data-test-button="send-user-invite" />
{{ / if }}
</div>
2017-02-16 22:50:05 +03:00
</div>