Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/views/user-admin/_deactivated-users-notice.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{# This should only be shown if there is more than 1 user deactivated due to inactivity #}
{% set insetTextHtml %}
<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
{% endset %}

{{ insetText({
html: insetTextHtml,
classes: "nhsuk-u-margin-top-0"
}) }}
23 changes: 23 additions & 0 deletions app/views/user-admin/_search-filter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class="app-filters nhsuk-u-margin-top-5">
<form action="/user-admin" method="get" novalidate>

{{ input({
name: "q",
value: data.q,
classes: "nhsuk-input--width-20",
label: {
text: "Search " + currentSubSection + " users by name or email"
},
formGroup: {
classes: "nhsuk-u-margin-bottom-0",
afterInput: {
html: button({
text: "Search",
classes: "nhsuk-button--secondary nhsuk-button--small"
})
}
}
}) }}

</form>
</div>
27 changes: 3 additions & 24 deletions app/views/user-admin/deactivated.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,9 @@ <h1 class="nhsuk-heading-l">Manage users</h1>
"href": "/user-admin/add-user"
}) }}

<div class="nhsuk-inset-text">
<span class="nhsuk-u-visually-hidden">Information: </span>

<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
</div>

<div class="app-filters nhsuk-u-margin-top-5">
<form action="/user-admin" method="get" novalidate>
<div class="nhsuk-form-group nhsuk-u-margin-bottom-0">
<label class="nhsuk-label" for="q">
Search deactivated users by name or email
</label>
<input class="nhsuk-input nhsuk-input--width-20" id="q" name="q" type="search" value="{{ q }}">

{{ button({
text: "Search",
classes: "nhsuk-button--secondary nhsuk-u-margin-left-2 nhsuk-button--small"
})}}
</div>
</form>
</div>
<br>

{% include "user-admin/_deactivated-users-notice.html" %}

{% include "user-admin/_search-filter.html" %}

<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-full">
Expand All @@ -54,7 +33,7 @@ <h1 class="nhsuk-heading-l">Manage users</h1>

<br>

<caption class="nhsuk-table__caption">3 Deactivated users</caption>
<caption class="nhsuk-table__caption nhsuk-table__caption--m">3 deactivated users</caption>

<thead class="nhsuk-table__head" role="rowgroup">
<thead role="rowgroup" class="nhsuk-table__head">
Expand Down
38 changes: 3 additions & 35 deletions app/views/user-admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,40 +32,8 @@ <h1 class="nhsuk-heading-l">Manage users</h1>
"href": "/user-admin/add-user"
}) }}

<div class="nhsuk-inset-text">
<span class="nhsuk-u-visually-hidden">Information: </span>

<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
</div>


<div class="app-filters nhsuk-u-margin-top-5">
<form action="/user-admin" method="get" novalidate>

{{ input({
name: "q",
value: data.q,
classes: "nhsuk-input--width-20",
label: {
text: "Search active users by name or email"
},
formGroup: {
classes: "nhsuk-u-margin-bottom-0",
afterInput: {
html: button({
text: "Search",
classes: "nhsuk-button--secondary nhsuk-button--small"
})
}
}
}) }}

</form>
</div>

<br>


{% include "user-admin/_deactivated-users-notice.html" %}
{% include "user-admin/_search-filter.html" %}

<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-full">
Expand All @@ -92,7 +60,7 @@ <h1 class="nhsuk-heading-l">Manage users</h1>
Name
</th>
<th role="columnheader" class="" scope="col">
Email address
Email
</th>
<th role="columnheader" class="" scope="col">
Vaccinator
Expand Down
33 changes: 4 additions & 29 deletions app/views/user-admin/invited.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,8 @@ <h1 class="nhsuk-heading-l">Manage users</h1>
"href": "/user-admin/add-user"
}) }}


<div class="nhsuk-inset-text">
<span class="nhsuk-u-visually-hidden">Information: </span>

<p>For security, we deactivate users who have not logged in for 90 days. <a href="/user-admin/reactivate-all">Reactivate users (2)</a></p>
</div>


<div class="app-filters nhsuk-u-margin-top-5">
<form action="/user-admin" method="get" novalidate>
<div class="nhsuk-form-group nhsuk-u-margin-bottom-0">
<label class="nhsuk-label" for="q">
Search invited users by name or email
</label>
<input class="nhsuk-input nhsuk-input--width-20" id="q" name="q" type="search" value="{{ q }}">

{{ button({
text: "Search",
classes: "nhsuk-button--secondary nhsuk-u-margin-left-2 nhsuk-button--small"
})}}
</div>
</form>
</div>
<br>



{% include "user-admin/_deactivated-users-notice.html" %}
{% include "user-admin/_search-filter.html" %}

<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-full">
Expand All @@ -57,7 +32,7 @@ <h1 class="nhsuk-heading-l">Manage users</h1>
<br>


<caption class="nhsuk-table__caption">4 Invited users</caption>
<caption class="nhsuk-table__caption nhsuk-table__caption--m">4 invited users</caption>

<thead class="nhsuk-table__head" role="rowgroup">
<thead role="rowgroup" class="nhsuk-table__head">
Expand All @@ -70,7 +45,7 @@ <h1 class="nhsuk-heading-l">Manage users</h1>
Email
</th>
<th role="columnheader" class="" scope="col">
Clinician
Vaccinator
</th>
<th role="columnheader" class="" scope="col">
Permission
Expand Down