From 1a996470eac85d5a472af8b8c9303e4460a231e3 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Thu, 11 Jun 2020 14:53:40 +0200 Subject: [PATCH] Replace all use of input for button. --- .../templates/determinations/base_determination_form.html | 4 ++-- .../determinations/batch_determination_form.html | 4 ++-- .../apply/funds/templates/funds/admin/parent_chooser.html | 2 +- .../funds/applicationsubmission_confirm_delete.html | 2 +- .../funds/templates/funds/applicationsubmission_form.html | 2 +- .../templates/funds/includes/delegated_form_base.html | 8 ++++---- .../funds/templates/funds/reminder_confirm_delete.html | 2 +- hypha/apply/funds/templates/funds/submission_sealed.html | 2 +- .../application_projects/includes/report_line.html | 2 +- .../templates/application_projects/includes/reports.html | 2 +- .../paymentrequest_confirm_delete.html | 2 +- .../application_projects/paymentrequest_form.html | 2 +- .../templates/application_projects/report_form.html | 4 ++-- .../review/templates/review/review_confirm_delete.html | 2 +- hypha/apply/review/templates/review/review_edit_form.html | 4 ++-- hypha/public/news/templates/news/news_index.html | 2 +- .../public/people/templates/people/person_index_page.html | 2 +- hypha/templates/password_required.html | 2 +- 18 files changed, 25 insertions(+), 25 deletions(-) diff --git a/hypha/apply/determinations/templates/determinations/base_determination_form.html b/hypha/apply/determinations/templates/determinations/base_determination_form.html index e5c6f53a5..f982f1223 100644 --- a/hypha/apply/determinations/templates/determinations/base_determination_form.html +++ b/hypha/apply/determinations/templates/determinations/base_determination_form.html @@ -45,9 +45,9 @@ {% endfor %} {% block form_buttons %} {% if form.draft_button_name %} - <input class="button button--submit button--top-space button--white" type="submit" value="Save Draft" name="{{ form.draft_button_name }}" formnovalidate/> + <button class="button button--submit button--top-space button--white" type="submit" name="{{ form.draft_button_name }}" formnovalidate>Save Draft</button> {% endif %} - <input class="button button--submit button--top-space button--primary" type="submit" value="Send/Save" name="submit" /> + <button class="button button--submit button--top-space button--primary" type="submit" name="submit">Send/Save</button> {% endblock %} </form> {% for type, message in message_templates.items %} diff --git a/hypha/apply/determinations/templates/determinations/batch_determination_form.html b/hypha/apply/determinations/templates/determinations/batch_determination_form.html index cf9081798..8ed93ff2f 100644 --- a/hypha/apply/determinations/templates/determinations/batch_determination_form.html +++ b/hypha/apply/determinations/templates/determinations/batch_determination_form.html @@ -34,9 +34,9 @@ {% endblock %} {% block form_buttons %} -<input data-fancybox data-src="#batch-send-determination" class="button button--submit button--top-space button--primary js-batch-determine-send" type="button" value="Send" /> +<button data-fancybox data-src="#batch-send-determination" class="button button--submit button--top-space button--primary js-batch-determine-send" type="button">Send</button> {% include "determinations/includes/batch_determination_confirmation.html" with count=submissions.count %} -<input type="submit" value="Submit" name="submit" style="display: none" /> +<input type="submit" value="Submit" name="submit" class="is-hidden" /> {% endblock %} {% block extra_js %} diff --git a/hypha/apply/funds/templates/funds/admin/parent_chooser.html b/hypha/apply/funds/templates/funds/admin/parent_chooser.html index 4a0719957..5bb8857fe 100644 --- a/hypha/apply/funds/templates/funds/admin/parent_chooser.html +++ b/hypha/apply/funds/templates/funds/admin/parent_chooser.html @@ -17,7 +17,7 @@ <ul class="fields"> {% include "wagtailadmin/shared/field_as_li.html" with field=form.parent_page %} <li> - <input type="submit" class="button" value="{% trans 'Continue' %}"> + <button type="submit" class="button">{% trans 'Continue' %}</button> </li> </ul> </form> diff --git a/hypha/apply/funds/templates/funds/applicationsubmission_confirm_delete.html b/hypha/apply/funds/templates/funds/applicationsubmission_confirm_delete.html index 89e8fc98e..4785ffc26 100644 --- a/hypha/apply/funds/templates/funds/applicationsubmission_confirm_delete.html +++ b/hypha/apply/funds/templates/funds/applicationsubmission_confirm_delete.html @@ -16,7 +16,7 @@ {% csrf_token %} <p><strong>Are you sure you want to delete "{{ object }}"?</strong></p> <p>All content related to this submission will also be deleted. This includes reviews, determinations and comments.</p> - <input class="button button--warning button--submit button--top-space" type="submit"value="Confirm" /> + <button class="button button--warning button--submit button--top-space" type="submit">Confirm</button> </form> </div> </div> diff --git a/hypha/apply/funds/templates/funds/applicationsubmission_form.html b/hypha/apply/funds/templates/funds/applicationsubmission_form.html index 5580b435d..a1ea6e207 100644 --- a/hypha/apply/funds/templates/funds/applicationsubmission_form.html +++ b/hypha/apply/funds/templates/funds/applicationsubmission_form.html @@ -28,7 +28,7 @@ {% endif %} {% endfor %} {% for button_name, button_type, button_value in buttons %} - <input class="button button--submit button--top-space button--{{ button_type }}" type="submit" name="{{ button_name }}" value="{{ button_value }}"{% if button_value == 'Save Draft' %} formnovalidate{% endif %}/> + <button class="button button--submit button--top-space button--{{ button_type }}" type="submit" name="{{ button_name }}" {% if button_value == 'Save Draft' %}formnovalidate{% endif %}>{{ button_value }}</button> {% endfor %} </form> </div> diff --git a/hypha/apply/funds/templates/funds/includes/delegated_form_base.html b/hypha/apply/funds/templates/funds/includes/delegated_form_base.html index 5c310f693..ff7cf8a25 100644 --- a/hypha/apply/funds/templates/funds/includes/delegated_form_base.html +++ b/hypha/apply/funds/templates/funds/includes/delegated_form_base.html @@ -30,13 +30,13 @@ </button> {% endif %} - <input + <button class="button button--{% if invert %}white{% elif value == 'Delete' %}warning{% else %}primary{% endif %} button--top-space" id="{{ form.name }}-submit" name="{{ form_prefix }}{{ form.name }}" type="submit" - form="{{ form.name }}" - value="{{ value }}" - > + form="{{ form.name }}"> + {{ value }} + </button> </form> diff --git a/hypha/apply/funds/templates/funds/reminder_confirm_delete.html b/hypha/apply/funds/templates/funds/reminder_confirm_delete.html index 9fca2cfbd..1ddc97aab 100644 --- a/hypha/apply/funds/templates/funds/reminder_confirm_delete.html +++ b/hypha/apply/funds/templates/funds/reminder_confirm_delete.html @@ -15,7 +15,7 @@ <form class="form" action="" method="post"> {% csrf_token %} <p><strong>Are you sure you want to delete "{{ object }}"?</strong></p> - <input class="button button--warning button--submit button--top-space" type="submit"value="Confirm" /> + <button class="button button--warning button--submit button--top-space" type="submit">Confirm</button> </form> </div> </div> diff --git a/hypha/apply/funds/templates/funds/submission_sealed.html b/hypha/apply/funds/templates/funds/submission_sealed.html index e85a5752f..c13ee2116 100644 --- a/hypha/apply/funds/templates/funds/submission_sealed.html +++ b/hypha/apply/funds/templates/funds/submission_sealed.html @@ -24,7 +24,7 @@ <p>As an admin you are allowed to access the application. However, this action will be recorded.</p> <form method="post"> {% csrf_token %} - <input class="button button--warning" type="submit" value="View application" /> + <button class="button button--warning" type="submit">View application</button> </form> {% endif %} </div> diff --git a/hypha/apply/projects/templates/application_projects/includes/report_line.html b/hypha/apply/projects/templates/application_projects/includes/report_line.html index 433d7ad94..dbf0e2104 100644 --- a/hypha/apply/projects/templates/application_projects/includes/report_line.html +++ b/hypha/apply/projects/templates/application_projects/includes/report_line.html @@ -36,7 +36,7 @@ <form action="{% url "apply:projects:reports:skip" pk=report.pk %}" method="post"> {% csrf_token %} <div class="modal__buttons"> - <input type="submit" value="Continue" class="button button--primary button--submit"></input> + <button type="submit" class="button button--primary button--submit">Continue</button> <button data-fancybox-close class="button button--submit button--white">Cancel</button> </div> </form> diff --git a/hypha/apply/projects/templates/application_projects/includes/reports.html b/hypha/apply/projects/templates/application_projects/includes/reports.html index 32b334d71..84aca5a80 100644 --- a/hypha/apply/projects/templates/application_projects/includes/reports.html +++ b/hypha/apply/projects/templates/application_projects/includes/reports.html @@ -82,7 +82,7 @@ {% if request.user.is_apply_staff %} <form action="{% url "apply:projects:reports:skip" pk=report.pk %}" method="post"> {% csrf_token %} - <input type="submit" value="Unskip" class="btn data-block__action-link"></input> + <button type="submit" class="btn data-block__action-link">Unskip</button> </form> {% endif %} {% endif %} diff --git a/hypha/apply/projects/templates/application_projects/paymentrequest_confirm_delete.html b/hypha/apply/projects/templates/application_projects/paymentrequest_confirm_delete.html index d3907d95c..57ada7291 100644 --- a/hypha/apply/projects/templates/application_projects/paymentrequest_confirm_delete.html +++ b/hypha/apply/projects/templates/application_projects/paymentrequest_confirm_delete.html @@ -28,7 +28,7 @@ <div class="card card--solid"> <form method="post">{% csrf_token %} <p>Are you sure you want to delete this payment request for {{ object.project.title }}?</p> - <input class="button button--primary" type="submit" value="Confirm"> + <button class="button button--primary" type="submit">Confirm</button> </form> </div> diff --git a/hypha/apply/projects/templates/application_projects/paymentrequest_form.html b/hypha/apply/projects/templates/application_projects/paymentrequest_form.html index c0b49835b..0e4600342 100644 --- a/hypha/apply/projects/templates/application_projects/paymentrequest_form.html +++ b/hypha/apply/projects/templates/application_projects/paymentrequest_form.html @@ -25,7 +25,7 @@ {{ field }} {% endif %} {% endfor %} - <input class="button button--submit button--top-space button--primary" type="submit" name="save" value="Save" /> + <button class="button button--submit button--top-space button--primary" type="submit" name="save">Save</button> </form> </div> </div> diff --git a/hypha/apply/projects/templates/application_projects/report_form.html b/hypha/apply/projects/templates/application_projects/report_form.html index 13bea5019..cf6e1c8ad 100644 --- a/hypha/apply/projects/templates/application_projects/report_form.html +++ b/hypha/apply/projects/templates/application_projects/report_form.html @@ -42,8 +42,8 @@ <input type="submit" id="submit-report-form-submit" name="submit" class="is-hidden" /> <input type="submit" id="submit-report-form-save" name="save" class="is-hidden" /> - <input data-fancybox data-src="#save-report" class="button button--submit button--top-space button--white" type="button" value="Save" /> - <input data-fancybox data-src="#submit-report" class="button button--primary" type="button" value="Submit" /> + <button data-fancybox data-src="#save-report" class="button button--submit button--top-space button--white" type="button">Save</button> + <button data-fancybox data-src="#submit-report" class="button button--primary" type="button">Submit</button> <!-- Save report modal --> <div class="modal" id="save-report"> diff --git a/hypha/apply/review/templates/review/review_confirm_delete.html b/hypha/apply/review/templates/review/review_confirm_delete.html index 5084d5cc4..f04048494 100644 --- a/hypha/apply/review/templates/review/review_confirm_delete.html +++ b/hypha/apply/review/templates/review/review_confirm_delete.html @@ -14,7 +14,7 @@ <form class="form" action="" method="post"> {% csrf_token %} <p><strong>Are you sure you want to delete "{{ object }}"?</strong></p> - <input class="button button--warning button--submit button--top-space" type="submit"value="Confirm" /> + <button class="button button--warning button--submit button--top-space" type="submit">Confirm</button> </form> </div> </div> diff --git a/hypha/apply/review/templates/review/review_edit_form.html b/hypha/apply/review/templates/review/review_edit_form.html index c027c4b2c..06de916bf 100644 --- a/hypha/apply/review/templates/review/review_edit_form.html +++ b/hypha/apply/review/templates/review/review_edit_form.html @@ -36,9 +36,9 @@ {% endif %} {% endfor %} {% if not object.id or object.is_draft %} - <input class="button button--submit button--top-space button--white" type="submit" value="Save Draft" name="{{ form.draft_button_name }}" /> + <button class="button button--submit button--top-space button--white" type="submit" name="{{ form.draft_button_name }}">Save Draft</button> {% endif %} - <input class="button button--submit button--top-space button--primary" type="submit" value="Submit" name="submit" /> + <button class="button button--submit button--top-space button--primary" type="submit" name="submit">Submit</button> </form> </div> {% endblock %} diff --git a/hypha/public/news/templates/news/news_index.html b/hypha/public/news/templates/news/news_index.html index e17f3ec58..84c5c7ef6 100644 --- a/hypha/public/news/templates/news/news_index.html +++ b/hypha/public/news/templates/news/news_index.html @@ -19,7 +19,7 @@ {% endfor %} </select> </div> - <input class="link link--button link--button__stretch" type="submit" value="Filter"> + <button class="link link--button link--button__stretch" type="submit">Filter</button> </form> {% if news %} diff --git a/hypha/public/people/templates/people/person_index_page.html b/hypha/public/people/templates/people/person_index_page.html index 20ecde4a5..6fd80c5cb 100644 --- a/hypha/public/people/templates/people/person_index_page.html +++ b/hypha/public/people/templates/people/person_index_page.html @@ -25,7 +25,7 @@ <label for="inactive"></label> </div> </div> - <input class="link link--button link--button__stretch" type="submit" value="Filter"> + <button class="link link--button link--button__stretch" type="submit">Filter</button> </form> <div class="wrapper wrapper--listings"> diff --git a/hypha/templates/password_required.html b/hypha/templates/password_required.html index 810b6a455..719220833 100644 --- a/hypha/templates/password_required.html +++ b/hypha/templates/password_required.html @@ -22,7 +22,7 @@ {% for field in form.hidden_fields %} {{ field }} {% endfor %} - <input type="submit" value="Continue" /> + <button type="submit">Continue</button> </div> </form> {% endblock %} -- GitLab