Ghost/ghost/admin/app/components/modal-select-user-role.hbs
Kevin Ansfield ffe5416b77 Swapped staff role selector from <select> to new role selection modal
closes https://github.com/TryGhost/Team/issues/572

Role selection when inviting users was updated to show information about each staff role. This change updates the staff edit screen to use the same UI for changing the role of an existing user.

- added `select-user-role` modal which uses `<GhRoleSelection>` to allow role selection
- replaced the `<select>` input for changing a user's role with a button that triggers the role selection modal
  - role is not set unless the "Set role" button is clicked after making a selection, cancel or close will leave the original role selected
2021-04-12 11:35:50 +01:00

17 lines
593 B
Handlebars

<header class="modal-header">
<h1>Select role</h1>
</header>
<a class="close" href="" role="button" title="Close" {{on "click" this.close}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<div class="modal-body" {{did-insert this.setRoleFromModel}}>
<GhRoleSelection
@selected={{this.role}}
@setRole={{fn (mut this.role)}}
/>
</div>
<div class="modal-footer">
<button {{on "click" this.close}} class="gh-btn"><span>Cancel</span></button>
<button {{on "click" this.confirmAction}} class="gh-btn gh-btn-black"><span>Set role</span></button>
</div>