-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add review access request form
- Loading branch information
Ian leggett
committed
Oct 29, 2024
1 parent
6b842a1
commit 921dd2a
Showing
5 changed files
with
338 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
dataworkspace/dataworkspace/templates/datasets/manage_permissions/review_access.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{% extends '_main.html' %} | ||
{% load humanize static datasets_tags core_tags waffle_tags %} | ||
|
||
{% block page_title %}{{ obj.name }} - {{ block.super }}{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-three-quarters"> | ||
<div class="govuk-breadcrumbs"> | ||
<ol class="govuk-breadcrumbs__list"> | ||
<li class="govuk-breadcrumbs__list-item"> | ||
<a class="govuk-breadcrumbs__link" href="/">Home</a> | ||
</li> | ||
<li class="govuk-breadcrumbs__list-item"> | ||
<a class="govuk-breadcrumbs__link" href="{{ obj.get_absolute_url }}">{{ obj.name }}</a> | ||
</li> | ||
<li class="govuk-breadcrumbs__list-item"> | ||
<a class="govuk-breadcrumbs__link" href="{{ obj_edit_url }}">Manage this dataset</a> | ||
</li> | ||
<li class="govuk-breadcrumbs__list-item"> | ||
<a class="govuk-breadcrumbs__link" href="{{obj_manage_url}}">Manage permissions</a> | ||
</li> | ||
<li class="govuk-breadcrumbs__list-item"> | ||
Review | ||
</li> | ||
</ol> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
{% include 'design_system/error_summary.html' with form=form %} | ||
<h1 class="govuk-heading-l">Review {{full_name}}'s access to {{obj.name}}</h1> | ||
<h2 class="govuk-heading-m">Requestor</h2> | ||
<p class="govuk-body govuk-!-margin-0"><strong>{{full_name}}</strong></p> | ||
<p class="govuk-body">{{email}}</p> | ||
<h2 class="govuk-heading-m">Requestor's reason for access</h2> | ||
<p class="govuk-body {% if not eligibility_criteria %}govuk-!-margin-bottom-7{% endif %}">{{reason_for_access}}</p> | ||
{% if eligibility_criteria is not null %} | ||
<h2 class="govuk-heading-m">Have the eligibility requirements been met?</h2> | ||
<details class="govuk-details govuk govuk-!-margin-bottom-4" data-module="govuk-details"> | ||
<summary class="govuk-details__summary"> | ||
<span class="govuk-details__summary-text"> | ||
Eligibility requirements needed to access this data | ||
</span> | ||
</summary> | ||
<div class="govuk-details__text"> | ||
{% if eligibility_criteria|length == 1 %} | ||
<p class="govuk-body">{{ eligibility_criteria|first }}</p> | ||
{% else %} | ||
<ul class="govuk-list govuk-list--bullet"> | ||
{% for criteria in eligibility_criteria %} | ||
<li>{{ criteria }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</div> | ||
</details> | ||
{% if is_eligible %} | ||
<p class="govuk-body"><strong>The requestor answered that they do meet the eligibility requirements</strong></p> | ||
{% else %} | ||
<p class="govuk-body"><strong>The requestor answered that they do not meet the eligibility requirements</strong></p> | ||
<p class="govuk-body govuk-!-margin-bottom-7">You can still grant them access if they have a good reason for it.</p> | ||
{% endif %} | ||
{% endif %} | ||
<form method="post" novalidate> | ||
{% csrf_token %} | ||
<div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios"> | ||
{{form.action_type}} | ||
<div class="govuk-radios__conditional govuk-radios__conditional--hidden" id="conditional-message"> | ||
{{ form.message }} | ||
</div> | ||
</div> | ||
<button type="submit" class="govuk-button"> | ||
Submit | ||
</button> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters