Skip to content

Commit

Permalink
Ensured no errors on WAVE testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tomik-z-cech committed Mar 14, 2024
1 parent 57d2829 commit 2043e49
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 83 deletions.
3 changes: 2 additions & 1 deletion checkout/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def __init__(self, *args, **kwargs):
{"placeholder": "Your Phone Number (required)"}
)
self.fields["voucher"].widget.attrs.update(
{"placeholder": "Discount Code"}
{"placeholder": "Discount Code",
"aria-label": "Discount Code"}
)
self.fields["voucher"].label = ""
if "instance" in kwargs:
Expand Down
6 changes: 5 additions & 1 deletion checkout/templates/checkout/checkout.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
<div class="accordion-body d-flex justify-content-center">
{{ order_form.delivery_option|as_crispy_field}}
</div>
<button type="submit" name="delivery" id="delivery-button"></button>
<button type="submit" name="delivery" id="delivery-button">
<span class="hide">
Change delivery option
</span>
</button>
</div>
</div>
<div class="accordion-item">
Expand Down
12 changes: 6 additions & 6 deletions history/templates/history/order_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,22 @@ <h2 class="my-2 text-center">
<span class="step-links">
{% if invoices.has_previous %}
<a href="?page=1"><i class="bi bi-chevron-bar-left"></i></a>
<a href="?page={{ invoices.previous_page_number }}"><i class="bi bi-chevron-left"></i></a>
<a href="?page={{ invoices.previous_page_number }}"><i class="bi bi-chevron-left"></i><span class="hide">Previous</span></a>
{% else %}
<i class="bi bi-chevron-bar-left"></i>
<i class="bi bi-chevron-left"></i>
<i class="bi bi-chevron-left"></i><span class="hide">Previous</span>
{% endif %}

<span class="current-page">
Page {{ invoices.number }} of {{ invoices.paginator.num_pages }}
</span>

{% if invoices.has_next %}
<a href="?page={{ invoices.next_page_number }}"><i class="bi bi-chevron-right"></i></a>
<a href="?page={{ invoices.paginator.num_pages }}"><i class="bi bi-chevron-bar-right"></i></a>
<a href="?page={{ invoices.next_page_number }}"><i class="bi bi-chevron-right"><span class="hide">Next</span></i></a>
<a href="?page={{ invoices.paginator.num_pages }}"><i class="bi bi-chevron-bar-right"></i><span class="hide">End</span></a>
{% else %}
<i class="bi bi-chevron-right"></i>
<i class="bi bi-chevron-bar-right"></i>
<i class="bi bi-chevron-right"><span class="hide">Next</span></i><span class="hide>Next</span>
<i class="bi bi-chevron-bar-right"></i><span class="hide">End</span><span class="hide>End</span>
{% endif %}
</span>
</div>
Expand Down
12 changes: 6 additions & 6 deletions items/templates/items/shop.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,22 @@ <h3 class="text-center category-heading">
<span class="step-links">
{% if items.has_previous %}
<a href="?page=1&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i><span class="hide">Previous</span></a>
{% else %}
<i class="bi bi-chevron-bar-left"></i>
<i class="bi bi-chevron-left"></i>
<i class="bi bi-chevron-left"></i><span class="hide">Previous</span>
{% endif %}

<span class="current-page">
Page {{ items.number }} of {{ items.paginator.num_pages }}
</span>

{% if items.has_next %}
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i></a>
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"><span class="hide">Next</span></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i><span class="hide">End</span></a>
{% else %}
<i class="bi bi-chevron-right"></i>
<i class="bi bi-chevron-bar-right"></i>
<i class="bi bi-chevron-right"><span class="hide">Next</span></i><span class="hide>Next</span>
<i class="bi bi-chevron-bar-right"></i><span class="hide">End</span><span class="hide>End</span>
{% endif %}
</span>
</div>
Expand Down
4 changes: 3 additions & 1 deletion owner/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ class Meta:
fields = "__all__"
widgets = {
"newsletter_email": forms.DateInput(
attrs={"type": "email", "placeholder": "your@email.ie"}
attrs={"type": "email",
"placeholder": "your@email.ie",
"aria-label": "Newsletter Sign-Up"}
),
}

Expand Down
12 changes: 6 additions & 6 deletions owner/templates/owner/comments_owner.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,22 @@ <h2 class="my-2 text-center">
<span class="step-links">
{% if comments.has_previous %}
<a href="?page=1&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i><span class="hide">Previous</span></a>
{% else %}
<i class="bi bi-chevron-bar-left"></i>
<i class="bi bi-chevron-left"></i>
<i class="bi bi-chevron-left"></i><span class="hide">Previous</span>
{% endif %}

<span class="current-page">
Page {{ comments.number }} of {{ comments.paginator.num_pages }}
</span>

{% if comments.has_next %}
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i></a>
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"><span class="hide">Next</span></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i><span class="hide">End</span></a>
{% else %}
<i class="bi bi-chevron-right"></i>
<i class="bi bi-chevron-bar-right"></i>
<i class="bi bi-chevron-right"><span class="hide">Next</span></i>
<i class="bi bi-chevron-bar-right"></i><span class="hide">End</span>
{% endif %}
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions owner/templates/owner/edit_category.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ <h1 class="text-center">
// if no file selected - display message
$('#filename').text(`No file selected.`);
// if file input field changes
$('#new-image').change(function() {
$('#id_category_image').change(function() {
// set string and file preview
let file = $('#new-image')[0].files[0];
let file = $('#id_category_image')[0].files[0];
$('#filename').text(`Image will be set to : ${file.name}`);
// create file reader
let reader = new FileReader();
Expand Down
12 changes: 6 additions & 6 deletions owner/templates/owner/edit_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ <h1 class="text-center">
$(document).ready(function() {
// prefill the text fields
$('#filename-1, #filename-2, #filename-3').text(`No file selected.`);
$('#new-image-1').change(function() {
let file = $('#new-image-1')[0].files[0];
$('#id_image_1').change(function() {
let file = $('#id_image_1')[0].files[0];
$('#filename-1').text(`Image 1 will be set to : ${file.name}`);
});
// file inputs text change
$('#new-image-2').change(function() {
let file = $('#new-image-2')[0].files[0];
$('#id_image_2').change(function() {
let file = $('#id_image_2')[0].files[0];
$('#filename-2').text(`Image 2 will be set to : ${file.name}`);
});
$('#new-image-3').change(function() {
let file = $('#new-image-3')[0].files[0];
$('#id_image_3').change(function() {
let file = $('#id_image_3')[0].files[0];
$('#filename-3').text(`Image 3 will be set to : ${file.name}`);
});
if ($('#id_different_values').val() == 0){
Expand Down
12 changes: 6 additions & 6 deletions owner/templates/owner/invoices.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ <h2 class="my-2 text-center">
<span class="step-links">
{% if invoices.has_previous %}
<a href="?page=1"><i class="bi bi-chevron-bar-left"></i></a>
<a href="?page={{ invoices.previous_page_number }}"><i class="bi bi-chevron-left"></i></a>
<a href="?page={{ invoices.previous_page_number }}"><i class="bi bi-chevron-left"></i><span class="hide">Previous</span></a>
{% else %}
<i class="bi bi-chevron-bar-left"></i>
<i class="bi bi-chevron-left"></i>
<i class="bi bi-chevron-left"></i><span class="hide">Previous</span>
{% endif %}

<span class="current-page">
Page {{ invoices.number }} of {{ invoices.paginator.num_pages }}
</span>

{% if invoices.has_next %}
<a href="?page={{ invoices.next_page_number }}"><i class="bi bi-chevron-right"></i></a>
<a href="?page={{ invoices.paginator.num_pages }}"><i class="bi bi-chevron-bar-right"></i></a>
<a href="?page={{ invoices.next_page_number }}"><i class="bi bi-chevron-right"><span class="hide">Next</span></i></a>
<a href="?page={{ invoices.paginator.num_pages }}"><i class="bi bi-chevron-bar-right"></i><span class="hide">End</span></a>
{% else %}
<i class="bi bi-chevron-right"></i>
<i class="bi bi-chevron-bar-right"></i>
<i class="bi bi-chevron-right"><span class="hide">Next</span></i>
<i class="bi bi-chevron-bar-right"></i><span class="hide">End</span>
{% endif %}
</span>
</div>
Expand Down
12 changes: 6 additions & 6 deletions owner/templates/owner/items.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,22 @@ <h2 class="my-2 text-center">
<span class="step-links">
{% if items.has_previous %}
<a href="?page=1&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i><span class="hide">Previous</span></a>
{% else %}
<i class="bi bi-chevron-bar-left"></i>
<i class="bi bi-chevron-left"></i>
<i class="bi bi-chevron-left"></i><span class="hide">Previous</span>
{% endif %}

<span class="current-page">
Page {{ items.number }} of {{ items.paginator.num_pages }}
</span>

{% if items.has_next %}
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i></a>
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"><span class="hide">Next</span></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i><span class="hide">End</span></a>
{% else %}
<i class="bi bi-chevron-right"></i>
<i class="bi bi-chevron-bar-right"></i>
<i class="bi bi-chevron-right"><span class="hide">Next</span></i>
<i class="bi bi-chevron-bar-right"></i><span class="hide">End</span>
{% endif %}
</span>
</div>
Expand Down
28 changes: 14 additions & 14 deletions owner/templates/owner/newsletter_emails.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ <h2 class="my-2 text-center">
</div>
</td>
<!-- Email actions -->
{% if email.status == 0 %}
<td>
{% if email.status == 0 %}
<a href="{% url 'edit-email' email_pk=email.pk %}" aria-label="Edit" class="custom-button-table button-shadow full-button">Edit</a>
{% else %}
<span> No actions for sent email !</span>
{% endif %}
<a href="{% url 'edit-email' email_pk=email.pk %}" aria-label="Edit" class="custom-button-table button-shadow full-button">Edit</a>
</td>
<td>
{% if email.status == 0 %}
<a href="{% url 'email-delete-request' email_pk=email.pk %}" aria-label="Delete" class="custom-button-table button-shadow full-button ms-3">Delete</a>
{% endif %}
<a href="{% url 'email-delete-request' email_pk=email.pk %}" aria-label="Delete" class="custom-button-table button-shadow full-button ms-3">Delete</a>
</td>
{% else %}
<td colspan="2">
<span> No actions for sent email !</span>
</td>
{% endif %}
<tr>
{% endfor %}
<tr>
Expand All @@ -115,22 +115,22 @@ <h2 class="my-2 text-center">
<span class="step-links">
{% if emails.has_previous %}
<a href="?page=1&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i><span class="hide">Previous</span></a>
{% else %}
<i class="bi bi-chevron-bar-left"></i>
<i class="bi bi-chevron-left"></i>
<i class="bi bi-chevron-left"></i><span class="hide">Previous</span>
{% endif %}

<span class="current-page">
Page {{ emails.number }} of {{ emails.paginator.num_pages }}
</span>

{% if emails.has_next %}
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i></a>
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"><span class="hide">Next</span></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i><span class="hide">End</span></a>
{% else %}
<i class="bi bi-chevron-right"></i>
<i class="bi bi-chevron-bar-right"></i>
<i class="bi bi-chevron-right"><span class="hide">Next</span></i>
<i class="bi bi-chevron-bar-right"></i><span class="hide">End</span>
{% endif %}
</span>
</div>
Expand Down
12 changes: 6 additions & 6 deletions owner/templates/owner/vouchers.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,22 @@ <h2 class="my-2 text-center">
<span class="step-links">
{% if vouchers.has_previous %}
<a href="?page=1&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i></a>
<a href="?page={{ items.previous_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-left"></i><span class="hide">Previous</span></a>
{% else %}
<i class="bi bi-chevron-bar-left"></i>
<i class="bi bi-chevron-left"></i>
<i class="bi bi-chevron-left"></i><span class="hide">Previous</span>
{% endif %}

<span class="current-page">
Page {{ vouchers.number }} of {{ vouchers.paginator.num_pages }}
</span>

{% if vouchers.has_next %}
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i></a>
<a href="?page={{ items.next_page_number }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-right"><span class="hide">Next</span></i></a>
<a href="?page={{ items.paginator.num_pages }}&page_sort={{ page_sort }}&page_length={{ page_length }}"><i class="bi bi-chevron-bar-right"></i><span class="hide">End</span></a>
{% else %}
<i class="bi bi-chevron-right"></i>
<i class="bi bi-chevron-bar-right"></i>
<i class="bi bi-chevron-right"><span class="hide">Next</span></i>
<i class="bi bi-chevron-bar-right"></i><span class="hide">End</span>
{% endif %}
</span>
</div>
Expand Down
Loading

0 comments on commit 2043e49

Please sign in to comment.