Skip to content

Commit

Permalink
Merge pull request #3128 from cisagov/nl/2928-error-message-bundle
Browse files Browse the repository at this point in the history
#2928 - Updated all error messages to have error icon - [AB]
  • Loading branch information
CocoByte authored Nov 30, 2024
2 parents 8cf2c96 + 62ec595 commit 28b964c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/registrar/assets/src/js/getgov/table-members.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class MembersTable extends BaseTable {
aria-label="Expand for additional information"
>
<span>Expand</span>
<svg class="usa-icon usa-icon--big" aria-hidden="true" focusable="false" role="img" width="24">
<svg class="usa-icon usa-icon--large" aria-hidden="true" focusable="false" role="img" width="24">
<use xlink:href="/public/img/sprite.svg#expand_more"></use>
</svg>
</button>
Expand Down
7 changes: 7 additions & 0 deletions src/registrar/assets/src/sass/_theme/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,11 @@ abbr[title] {

.break-word {
word-break: break-word;
}

//Icon size adjustment used by buttons and form errors
.usa-icon.usa-icon--large {
margin: 0;
height: 1.5em;
width: 1.5em;
}
6 changes: 0 additions & 6 deletions src/registrar/assets/src/sass/_theme/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,6 @@ a .usa-icon,
width: 1.3em;
}

.usa-icon.usa-icon--big {
margin: 0;
height: 1.5em;
width: 1.5em;
}

// Red, for delete buttons
// Used on: All delete buttons
// Note: Can be simplified by adding text-secondary to delete anchors in tables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h2 id="domain-requests-header" class="display-inline-block">Domain requests</h2
<div class="section-outlined__utility-button mobile-lg:padding-right-105 {% if portfolio %} mobile:grid-col-12 desktop:grid-col-6 desktop:padding-left-3{% endif %}" id="export-csv">
<section aria-label="Domain Requests report component" class="margin-top-205">
<a href="{% url 'export_data_type_requests' %}" class="usa-button usa-button--unstyled usa-button--with-icon usa-button--justify-right" role="button">
<svg class="usa-icon usa-icon--big" aria-hidden="true" focusable="false" role="img" width="24" height="24">
<svg class="usa-icon usa-icon--large" aria-hidden="true" focusable="false" role="img" width="24" height="24">
<use xlink:href="{% static 'img/sprite.svg' %}#file_download"></use>
</svg>Export as CSV
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/registrar/templates/includes/domains_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2 id="domains-header" class="display-inline-block">Domains</h2>
<div class="section-outlined__utility-button mobile-lg:padding-right-105 {% if portfolio %} mobile:grid-col-12 desktop:grid-col-6 desktop:padding-left-3{% endif %}">
<section aria-label="Domains report component" class="margin-top-205">
<a href="{% url 'export_data_type_user' %}" class="usa-button usa-button--unstyled usa-button--with-icon usa-button--justify-right" role="button">
<svg class="usa-icon usa-icon--big" aria-hidden="true" focusable="false" role="img" width="24" height="24">
<svg class="usa-icon usa-icon--large" aria-hidden="true" focusable="false" role="img" width="24" height="24">
<use xlink:href="{%static 'img/sprite.svg'%}#file_download"></use>
</svg>Export as CSV
</a>
Expand Down
9 changes: 6 additions & 3 deletions src/registrar/templates/includes/input_with_errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@
{% if field.errors %}
<div id="{{ widget.attrs.id }}__error-message">
{% for error in field.errors %}
<span class="usa-error-message" role="alert">
{{ error }}
</span>
<div class="usa-error-message display-flex" role="alert">
<svg class="usa-icon usa-icon--large" focusable="true" role="img" aria-label="Error">
<use xlink:href="{%static 'img/sprite.svg'%}#error"></use>
</svg>
<span class="margin-left-05">{{ error }}</span>
</div>
{% endfor %}
</div>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion src/registrar/templates/includes/members_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class="section-outlined__utility-button mobile-lg:padding-right-105 {% if portfolio %} mobile:grid-col-12 desktop:grid-col-6 desktop:padding-left-3{% endif %}">
<section aria-label="Domains report component" class="margin-top-205">
<a href="{% url 'export_members_portfolio' %}" class="usa-button usa-button--unstyled usa-button--with-icon usa-button--justify-right" role="button">
<svg class="usa-icon usa-icon--big" aria-hidden="true" focusable="false" role="img" width="24" height="24">
<svg class="usa-icon usa-icon--large" aria-hidden="true" focusable="false" role="img" width="24" height="24">
<use xlink:href="{%static 'img/sprite.svg'%}#file_download"></use>
</svg>Export as CSV
</a>
Expand Down

0 comments on commit 28b964c

Please sign in to comment.