2021-04-07 17:20:30 +03:00
<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>
2015-11-18 13:50:48 +03:00
</header>
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
<div class="modal-body">
<fieldset>
2020-01-16 18:14:03 +03:00
<GhFormGroup @errors= {{ this .errors }} @hasValidated= {{ this .hasValidated }} @property="email">
2021-03-23 14:17:47 +03:00
<label for="new-user-email">Email address</label>
2020-01-16 18:14:03 +03:00
<GhTextInput
@class="email"
@id="new-user-email"
@type="email"
2021-04-07 17:20:30 +03:00
@placeholder="youremail@example.com"
2020-01-16 18:14:03 +03:00
@name="email"
@shouldFocus= {{ true }}
@autocapitalize="off"
@autocorrect="off"
@value= {{ readonly email }}
@input= {{ action ( mut email ) value = "target.value" }}
@keyEvents= {{ hash
2018-02-28 14:44:03 +03:00
Enter=(action "confirm")
2020-01-16 18:14:03 +03:00
}}
/>
2019-12-13 19:11:49 +03:00
<GhErrorMessage @errors= {{ this .errors }} @property="email" />
2020-01-16 18:14:03 +03:00
</GhFormGroup>
2015-11-18 13:50:48 +03:00
2021-04-10 10:16:16 +03:00
<GhRoleSelection
@selected= {{ this .role }}
@setRole= {{ this .setRole }}
2021-04-20 15:39:03 +03:00
@onValidationSuccess= {{ action "roleValidationSucceeded" }}
@onValidationFailure= {{ action "roleValidationFailed" }}
2021-04-10 10:16:16 +03:00
/>
2015-11-18 13:50:48 +03:00
</fieldset>
</div>
<div class="modal-footer">
2021-04-08 08:28:37 +03:00
{{ # 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 }}
2017-02-16 22:50:05 +03:00
</div>