Ghost/ghost/admin/templates/modals/invite-new-user.hbs
Jason Williams 5e021da86c Improve handling of users and roles in admin
Closes #3083 Refs #3229
- Populates the dropdown list in the invite user menu with the
  list of roles a user is permitted to create.
- Users API now checks the invite user request for allowed roles.
- Change API response from 200 to 201 on successful invitation.
- Change API response from 500 to 201 when the user was created but
  the email was not sent.  The client will show a warning notification
  when it sees 'invite-pending' as the new user's status.
- Add support for "?status=all" to the /users endpoint.
- Refactor the route and controller for the /settings/users page so
  that there's only one network API call to load users instead of two.
2014-07-24 14:20:47 +00:00

28 lines
1.1 KiB
Handlebars

{{#gh-modal-dialog action="closeModal" showClose=true type="action" animation="fade"
title="Invite a New User" confirm=confirm class="invite-new-user"}}
<fieldset>
<div class="form-group">
<label for="new-user-email">Email Address</label>
{{input class="email" id="new-user-email" type="email" placeholder="Email Address" name="email" autofocus="autofocus"
autocapitalize="off" autocorrect="off" value=email}}
</div>
<div class="form-group for-select">
<label for="new-user-role">Role</label>
<span class="gh-select" {{bind-attr data-select-text=selectedRole.name}}>
{{view Ember.Select
content=roles
id="new-user-role"
optionValuePath="content.id"
optionLabelPath="content.name"
name="role"
value=role
selection=selectedRole}}
</span>
</div>
</fieldset>
{{/gh-modal-dialog}}