-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1855: Add Page.updated_url to 12-week retest
- Loading branch information
Showing
11 changed files
with
174 additions
and
36 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
23 changes: 23 additions & 0 deletions
23
accessibility_monitoring_platform/apps/audits/migrations/0012_page_updated_url.py
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,23 @@ | ||
# Generated by Django 5.1.4 on 2024-12-31 08:13 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("audits", "0011_remove_audit_accessibility_statement_backup_url_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="page", | ||
name="updated_url", | ||
field=models.TextField(blank=True, default=""), | ||
), | ||
migrations.AddField( | ||
model_name="page", | ||
name="updated_location", | ||
field=models.TextField(blank=True, default=""), | ||
), | ||
] |
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
66 changes: 50 additions & 16 deletions
66
accessibility_monitoring_platform/apps/audits/templates/audits/forms/twelve_week_pages.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 |
---|---|---|
@@ -1,21 +1,55 @@ | ||
{% extends 'common/case_form.html' %} | ||
|
||
{% block preform %} | ||
{% for page in case.audit.testable_pages %} | ||
{% if page.failed_check_results.count > 0 %} | ||
<h2 class="govuk-heading-m">{{ page }}</h2> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<div class="govuk-form-group"> | ||
<label class="govuk-label"><b>URL</b></label> | ||
<div class="govuk-hint">{{ page.url }}</div> | ||
</div> | ||
<div class="govuk-form-group"> | ||
<label class="govuk-label"><b>Page location description if single page app</b></label> | ||
<div class="govuk-hint">{% if page.location %}{{ page.location }}{% else %}None{% endif %}</div> | ||
</div> | ||
</div> | ||
{% if audit_retest_pages_formset.errors %} | ||
{% for form in audit_retest_pages_formset.forms %} | ||
{% if form.errors %} | ||
{% include 'common/error_summary.html' %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block form %} | ||
<form method="post" action="{% url sitemap.current_platform_page.url_name object.id %}"> | ||
{% csrf_token %} | ||
{{ audit_retest_pages_formset.management_form }} | ||
|
||
<table class="govuk-table"> | ||
<tbody class="govuk-table__body"> | ||
{% for page_form in audit_retest_pages_formset %} | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<h2 class="govuk-heading-m">{{ page_form.instance }}</h2> | ||
<div class="govuk-form-group"> | ||
<label class="govuk-label"><b>URL</b></label> | ||
<div class="govuk-hint">{{ page_form.instance.url }}</div> | ||
</div> | ||
<div class="govuk-form-group"> | ||
<label class="govuk-label"><b>Page location description if single page app</b></label> | ||
<div class="govuk-hint">{% if page_form.instance.location %}{{ page_form.instance.location }}{% else %}None{% endif %}</div> | ||
</div> | ||
{% include 'common/form_errors.html' with errors=page_form.non_field_errors %} | ||
{% include 'common/form_hidden_fields.html' with hidden_fields=page_form.hidden_fields %} | ||
{% for field in page_form.visible_fields %} | ||
{% include 'common/amp_field.html' %} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
{% include 'common/amp_form_snippet.html' %} | ||
</div> | ||
<div class="govuk-grid-column-full"> | ||
{% include 'cases/helpers/save_continue_cancel.html' %} | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
</form> | ||
{% 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
29 changes: 29 additions & 0 deletions
29
accessibility_monitoring_platform/apps/audits/templates/audits/helpers/psb_page_links.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,29 @@ | ||
<details class="govuk-details" data-module="govuk-details"> | ||
<summary class="govuk-details__summary"> | ||
<span class="govuk-details__summary-text"> | ||
Website links | ||
</span> | ||
</summary> | ||
<div class="govuk-details__text"> | ||
{% if page %} | ||
{% if page.url %} | ||
<p class="govuk-body-m"> | ||
<a href="{{ page.url }}" rel="noreferrer noopener" target="_blank" class="govuk-link"> | ||
Link to {{ page }} (initial test)</a> | ||
</p> | ||
{% endif %} | ||
{% if page.updated_url %} | ||
<p class="govuk-body-m"> | ||
<a href="{{ page.updated_url }}" rel="noreferrer noopener" target="_blank" class="govuk-link"> | ||
Link to {{ page }} (12-week test)</a> | ||
</p> | ||
{% endif %} | ||
<p class="govuk-body-m amp-label amp-margin-bottom-0">Page location description if single page app</p> | ||
<p class="govuk-body-m">{% if page.location %}{{ page.location }}{% else %}N/A{% endif %}</p> | ||
<p class="govuk-body-m amp-label amp-margin-bottom-0">New page location</p> | ||
<p class="govuk-body-m">{% if page.updated_location %}{{ page.updated_location }}{% else %}N/A{% endif %}</p> | ||
{% else %} | ||
<p class="govuk-body">No page added.</p> | ||
{% endif %} | ||
</div> | ||
</details> |
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
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