Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forms shouldn't use browser validation but our own error messages. #2572

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1 class="mt-0">{{ view.title }}</h1>
<span>{{ error }}</span>
{% endfor %}

<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}

{% include view.form_template_name %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load i18n %}
<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}
{{ form.media }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</nav>

<h1>{% translate 'Feedback on this idea' %}</h1>
<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}
{% for form in forms.values %}
{{ form.media }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load i18n %}
<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}
{{ form.media }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 class="u-first-heading">{% translate 'Edit live stream' %}</h1>
{% endfor %}


<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}

{% include 'a4_candy_contrib/includes/form_field.html' with field=form.live_stream %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load i18n %}
<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}
{{ form.media }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</nav>

<h1>{% translate 'Moderate idea' %}</h1>
<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}
{% for form in forms.values %}
{{ form.media }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="col-md-9">
<h1 class="u-first-heading">{% translate "Create Newsletter" %}</h1>

<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}
{% include 'a4_candy_contrib/includes/form_field.html' with field=form.project %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load i18n %}
<form enctype="multipart/form-data" action="{{ request.path }}" method="post">
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post">
{% csrf_token %}

{% include 'a4_candy_contrib/includes/form_field.html' with field=form.event_type %}
Expand Down
4 changes: 3 additions & 1 deletion changelog/7632.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@
- update a4 to ckeditor5-transition-a4
- add image validator which validates that all img tags have the alt attribute
set to all ckedito5 fields

- disable browser-side form checks for forms which use ckeditor by adding
`novalidate` to them This is necessary as ckeditor form fields which are
required will block form submission otherwise.
Loading