mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-12 06:24:04 -05:00
Convert warning links to govuk-link--destructive
Converts links in the following: - the page-footer component - the table component - the browse-list component - the notification status, when reporting failures - validation messaging in the whitelist page
This commit is contained in:
@@ -16,19 +16,6 @@
|
||||
margin-bottom: $gutter-half;
|
||||
}
|
||||
|
||||
&-link-destructive {
|
||||
color: $error-colour;
|
||||
|
||||
&:visited,
|
||||
&:link {
|
||||
color: $error-colour;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $mellow-red;
|
||||
}
|
||||
}
|
||||
|
||||
&-hint {
|
||||
@include core-19;
|
||||
margin: 5px 0 10px 0;
|
||||
|
||||
@@ -8,26 +8,9 @@
|
||||
line-height: 40px;
|
||||
padding: 1px 0 0 15px;
|
||||
|
||||
a {
|
||||
|
||||
&:visited,
|
||||
&:link {
|
||||
color: $error-colour;
|
||||
display: inline-block;
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
color: $mellow-red;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&-delete-link-without-button {
|
||||
@include core-19;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@@ -212,15 +212,6 @@
|
||||
color: $error-colour;
|
||||
font-weight: bold;
|
||||
|
||||
a {
|
||||
|
||||
&:link,
|
||||
&:visited {
|
||||
color: $error-colour;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.status-hint {
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
@@ -356,22 +347,12 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $link-hover-colour;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&:focus {
|
||||
|
||||
color: $black;
|
||||
|
||||
&:before {
|
||||
border-color: $yellow;
|
||||
border-style: solid;
|
||||
border-width: 15px 3px 15px 15px;
|
||||
right: -3px;
|
||||
}
|
||||
|
||||
&:active:before,
|
||||
&:focus:before {
|
||||
border-color: $yellow;
|
||||
border-style: solid;
|
||||
border-width: 15px 3px 15px 15px;
|
||||
right: -3px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% for item in items %}
|
||||
{% if item.title and item.link %}
|
||||
<li class="browse-list-item">
|
||||
<a href="{{ item.link }}" class="govuk-link govuk-link--no-visited-state{% if item.destructive %} browse-list-link-destructive{% endif %}">{{ item.title }}</a>
|
||||
<a href="{{ item.link }}" class="govuk-link govuk-link--{% if item.destructive %}--destructive{% else %}--no-visited-state{% endif %}">{{ item.title }}</a>
|
||||
{% if item.hint %}
|
||||
<div class="browse-list-hint">
|
||||
{{ item.hint }}
|
||||
|
||||
@@ -149,13 +149,14 @@
|
||||
{% if not notification %}
|
||||
{% call field(align='right') %}{% endcall %}
|
||||
{% else %}
|
||||
{% set status = notification.status|format_notification_status_as_field_status(notification.notification_type) %}
|
||||
{% call field(
|
||||
status=notification.status|format_notification_status_as_field_status(notification.notification_type),
|
||||
status=status,
|
||||
align='right'
|
||||
) %}
|
||||
{% if displayed_on_single_line %}<span class="align-with-message-body">{% endif %}
|
||||
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
|
||||
<a class="govuk-link govuk-link--{% if status == 'error' %}destructive{% else %}no-visited-state{% endif %}" href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
|
||||
{% endif %}
|
||||
{{ notification.status|format_notification_status(notification.template.template_type) }}
|
||||
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<div class="ajax-block-container">
|
||||
<p class="notification-status {{ notification.status|format_notification_status_as_field_status(notification.notification_type) }}">
|
||||
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
|
||||
{% set field_status = notification.status|format_notification_status_as_field_status(notification.notification_type) %}
|
||||
{% set status_url = notification.status|format_notification_status_as_url(notification.notification_type) %}
|
||||
<p class="notification-status {{ field_status }}">
|
||||
{% if status_url %}
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ status_url }}">
|
||||
{% endif %}
|
||||
{{ notification.status|format_notification_status(
|
||||
notification.template.template_type
|
||||
) }}
|
||||
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
|
||||
{% if status_url %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if sent_with_test_key %}
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
<ul>
|
||||
{% if form.email_addresses.errors %}
|
||||
<li>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="#{{ form.email_addresses.name }}">Enter valid email addresses</a>
|
||||
<a class="govuk-link govuk-link--destructive" href="#{{ form.email_addresses.name }}">Enter valid email addresses</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if form.phone_numbers.errors %}
|
||||
<li>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="#{{ form.phone_numbers.name }}">Enter valid phone numbers</a>
|
||||
<a class="govuk-link govuk-link--destructive" href="#{{ form.phone_numbers.name }}">Enter valid phone numbers</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
{% endif %}
|
||||
{% if user.state == 'active' %}
|
||||
<span class="page-footer-delete-link page-footer-delete-link-without-button">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.archive_user', user_id=user.id) }}">
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('main.archive_user', user_id=user.id) }}">
|
||||
Archive user
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
<div class="page-footer">
|
||||
<span class="page-footer-delete-link page-footer-delete-link-without-button">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.cancel_letter_job', service_id=current_service.id, job_id=job.id) }}">Cancel sending these letters</a>
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('main.cancel_letter_job', service_id=current_service.id, job_id=job.id) }}">Cancel sending these letters</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<div> </div>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<div class="page-footer">
|
||||
{% if show_cancel_button %}
|
||||
<span class="page-footer-delete-link page-footer-delete-link-without-button">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.cancel_letter', service_id=current_service.id, notification_id=notification_id) }}">Cancel sending this letter</a>
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('main.cancel_letter', service_id=current_service.id, notification_id=notification_id) }}">Cancel sending this letter</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<div> </div>
|
||||
|
||||
@@ -375,13 +375,13 @@
|
||||
{% if current_service.active and (current_service.trial_mode or current_user.platform_admin) %}
|
||||
<p class="top-gutter-1-2">
|
||||
<span class="page-footer-delete-link page-footer-delete-link-without-button">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.archive_service', service_id=current_service.id) }}">
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.archive_service', service_id=current_service.id) }}">
|
||||
Delete this service
|
||||
</a>
|
||||
</span>
|
||||
{% if current_user.platform_admin %}
|
||||
<span class="page-footer-delete-link">
|
||||
<a href="{{ url_for('.suspend_service', service_id=current_service.id) }}" class="govuk-link govuk-link--no-visited-state page-footer-delete-link">
|
||||
<a href="{{ url_for('.suspend_service', service_id=current_service.id) }}" class="govuk-link govuk-link--destructive page-footer-delete-link">
|
||||
Suspend service
|
||||
</a>
|
||||
</span>
|
||||
@@ -394,7 +394,7 @@
|
||||
Service suspended
|
||||
</div>
|
||||
<span class="page-footer-delete-link page-footer-delete-link-without-button">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.resume_service', service_id=current_service.id) }}">
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.resume_service', service_id=current_service.id) }}">
|
||||
Resume service
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@@ -67,14 +67,14 @@
|
||||
{% if current_user.has_permissions('manage_templates') and user_has_template_permission %}
|
||||
{% if not template._template.archived %}
|
||||
<span class="page-footer-delete-link page-footer-delete-link-without-button bottom-gutter-2-3">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.delete_service_template', service_id=current_service.id, template_id=template.id) }}">Delete this template</a>
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.delete_service_template', service_id=current_service.id, template_id=template.id) }}">Delete this template</a>
|
||||
</span>
|
||||
 
|
||||
{% endif %}
|
||||
{% if template.template_type != 'letter' %}
|
||||
{% if not template._template.redact_personalisation %}
|
||||
<span class="page-footer-delete-link page-footer-delete-link-without-button">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.confirm_redact_template', service_id=current_service.id, template_id=template.id) }}">Hide personalisation after sending</a>
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.confirm_redact_template', service_id=current_service.id, template_id=template.id) }}">Hide personalisation after sending</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<p class="hint">Personalisation is hidden after sending</p>
|
||||
|
||||
Reference in New Issue
Block a user