Check for team members on request to go live page

One of the things that we want to check before a service goes live is
that they have at least two team members with the manage service
permission. Anyone who can make a request to go live has this
permission, so that means one additional user is needed. This is what we
can automatically communicate to the user.

Under the hood this makes use of the logic added in
https://github.com/alphagov/notifications-admin/pull/1891
This commit is contained in:
Chris Hill-Scott
2018-02-27 11:33:26 +00:00
parent 81cceb1c44
commit ca3fdfd907
4 changed files with 42 additions and 10 deletions

View File

@@ -1,15 +1,20 @@
{% macro tick_cross(yes, label) %}
{% macro tick_cross(yes, label, truthy_hint='Can', falsey_hint='Cant') %}
<li>
{% if yes %}
<span class="tick-cross-tick">
<span class="visually-hidden">Can</span>
<span class="visually-hidden">{{ truthy_hint }}</span>
{{ label}}
</span>
{% else %}
<span class="tick-cross-cross">
<span class="visually-hidden">Cant</span>
<span class="visually-hidden">{{ falsey_hint }}</span>
{{ label}}
</span>
{% endif %}
</li>
{% endmacro %}
{% macro tick_cross_done_not_done(yes, label) %}
{{ tick_cross(yes, label, truthy_hint='Done: ', falsey_hint='Not done: ') }}
{% endmacro %}