2015-11-18 13:50:48 +03:00
|
|
|
<header class="modal-header">
|
|
|
|
<h1>Invite a New User</h1>
|
|
|
|
</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">
|
2015-11-18 13:50:48 +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"
|
|
|
|
@placeholder="Email Address"
|
|
|
|
@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
|
|
|
}}
|
|
|
|
@focus-out={{action "validate" "email"}}
|
|
|
|
/>
|
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
|
|
|
|
2018-12-10 17:26:05 +03:00
|
|
|
|
2020-01-16 18:14:03 +03:00
|
|
|
<GhFormGroup @class="for-select" @errors={{this.errors}} @hasValidated={{this.hasValidated}} @property="role">
|
2015-11-18 13:50:48 +03:00
|
|
|
<label for="new-user-role">Role</label>
|
2018-06-04 19:51:09 +03:00
|
|
|
<span class="gh-select">
|
2020-01-16 18:14:03 +03:00
|
|
|
<OneWaySelect
|
|
|
|
@id="new-user-role"
|
|
|
|
@name="role"
|
|
|
|
@options={{readonly this.roles}}
|
|
|
|
@optionValuePath="id"
|
|
|
|
@optionLabelPath="name"
|
|
|
|
@value={{this.role}}
|
|
|
|
@update={{action "setRole"}}
|
|
|
|
/>
|
2018-03-19 12:57:31 +03:00
|
|
|
{{svg-jar "arrow-down-small"}}
|
2015-11-18 13:50:48 +03:00
|
|
|
</span>
|
2019-12-13 19:11:49 +03:00
|
|
|
<GhErrorMessage @errors={{this.errors}} @property="role" />
|
2020-01-16 18:14:03 +03:00
|
|
|
</GhFormGroup>
|
2015-11-18 13:50:48 +03:00
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
2020-01-16 18:14:03 +03:00
|
|
|
<GhTaskButton @buttonText="Send invitation now"
|
|
|
|
@successText="Sent"
|
|
|
|
@task={{this.sendInvitation}}
|
|
|
|
@class="gh-btn gh-btn-green gh-btn-icon"
|
|
|
|
@disabled={{this.fetchRoles.isRunning}}
|
|
|
|
@disableMouseDown="true" />
|
2017-02-16 22:50:05 +03:00
|
|
|
</div>
|