mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 15:18:26 -04:00
Set permissions with checkboxes, not yes/no inputs
The yes/no pattern didn’t work too well, because: - it didn’t read naturally as a question and answer - often users left them completely unclicked if they didn’t want to set the permission (rather than clicking no) This commit changes both the invite and edit user pages to use checkboxes to set permissions. If also rewords these pages to read more naturally, and explain what the permissions mean. This meant changing some of the view logic around invites and persmissions, and I ended up refactoring a bunch of it because I found it hard to understand what was going on.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/yes-no.html" import yes_no %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
@@ -10,21 +9,17 @@ Manage users – GOV.UK Notify
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
{{ user.name or user.email_localpart or "Add a new team member" }}
|
||||
{{ user.name or user.email_localpart }}
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
{{ user.email_address }}
|
||||
</p>
|
||||
|
||||
<div class="grid-row">
|
||||
<form method="post" class="column-three-quarters">
|
||||
|
||||
<fieldset class='yes-no-wrapper'>
|
||||
<legend class='heading-small'>
|
||||
Permissions
|
||||
</legend>
|
||||
<span class="form-hint">All team members can see message history</span>
|
||||
{{ yes_no(form.send_messages, form.send_messages.data) }}
|
||||
{{ yes_no(form.manage_service, form.manage_service.data) }}
|
||||
{{ yes_no(form.manage_api_keys, form.manage_api_keys.data) }}
|
||||
</fieldset>
|
||||
{% include 'views/manage-users/permissions.html' %}
|
||||
|
||||
{{ page_footer(
|
||||
'Save',
|
||||
|
||||
Reference in New Issue
Block a user