mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Merge pull request #238 from alphagov/show-invite-email
Show invite email
This commit is contained in:
@@ -104,7 +104,7 @@ class RegisterUserFromInviteForm(Form):
|
||||
mobile_number = mobile_number()
|
||||
password = password()
|
||||
service = HiddenField('service')
|
||||
email_address = HiddenField('email_address')
|
||||
email_address = email_address()
|
||||
|
||||
|
||||
class InviteUserForm(Form):
|
||||
|
||||
@@ -28,11 +28,15 @@ from app.utils import user_has_permissions
|
||||
def manage_users(service_id):
|
||||
users = user_api_client.get_users_for_service(service_id=service_id)
|
||||
invited_users = invite_api_client.get_invites_for_service(service_id=service_id)
|
||||
filtered_invites = []
|
||||
for invite in invited_users:
|
||||
if invite.status != 'accepted':
|
||||
filtered_invites.append(invite)
|
||||
return render_template('views/manage-users.html',
|
||||
service_id=service_id,
|
||||
users=users,
|
||||
current_user=current_user,
|
||||
invited_users=invited_users)
|
||||
invited_users=filtered_invites)
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/users/invite", methods=['GET', 'POST'])
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
help_link=None,
|
||||
help_link_text=None,
|
||||
width='2-3',
|
||||
suffix=None
|
||||
suffix=None,
|
||||
disabled=False
|
||||
) %}
|
||||
<div class="form-group{% if field.errors %} error{% endif %}" {% if autofocus %}data-module="autofocus"{% endif %}>
|
||||
<label class="form-label" for="{{ field.name }}">
|
||||
@@ -22,10 +23,21 @@
|
||||
</span>
|
||||
{% endif %}
|
||||
</label>
|
||||
{{ field(**{
|
||||
'class': 'form-control form-control-{} textbox-highlight-textbox'.format(width) if highlight_tags else 'form-control form-control-{} {}'.format(width, 'textbox-right-aligned' if suffix else ''),
|
||||
'data-module': 'highlight-tags' if highlight_tags else ''
|
||||
}) }}
|
||||
{% if disabled %}
|
||||
<p>{{ field(**{
|
||||
'class': 'form-control form-control-{} textbox-highlight-textbox'.format(width) if highlight_tags else 'form-control form-control-{} {}'.format(width, 'textbox-right-aligned' if suffix else ''),
|
||||
'data-module': 'highlight-tags' if highlight_tags else '',
|
||||
'disabled': 'disabled'
|
||||
}) }}
|
||||
</p>
|
||||
{% else %}
|
||||
{{ field(**{
|
||||
'class': 'form-control form-control-{} textbox-highlight-textbox'.format(width) if highlight_tags else 'form-control form-control-{} {}'.format(width, 'textbox-right-aligned' if suffix else ''),
|
||||
'data-module': 'highlight-tags' if highlight_tags else ''
|
||||
}) }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if suffix %}
|
||||
<span>{{ suffix }}</span>
|
||||
{% endif %}
|
||||
|
||||
@@ -12,12 +12,12 @@ Create an account – GOV.UK Notify
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-large">Create an account</h1>
|
||||
<form method="post" autocomplete="nope">
|
||||
{{ textbox(form.email_address, width='3-4', disabled=True ) }}
|
||||
{{ textbox(form.name, width='3-4') }}
|
||||
{{ textbox(form.mobile_number, width='3-4') }}
|
||||
{{ textbox(form.password, hint="Your password must have at least 10 characters", width='3-4') }}
|
||||
{{ page_footer("Continue") }}
|
||||
{{form.service}}
|
||||
{{form.email_address}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user