Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Disable client-side form validation

Patryk Zawadzki9269d5f63371
diff --git a/saleor/settings.py b/saleor/settings.py
index 3b099ef509..4494d0f8b9 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -241,24 +241,25 @@ GOOGLE_CLIENT_SECRET = os.environ.get('GOOGLE_CLIENT_SECRET')
PAYMENT_MODEL = 'order.Payment'
PAYMENT_VARIANTS = {
- 'default': ('payments.dummy.DummyProvider', {})
-}
+ 'default': ('payments.dummy.DummyProvider', {})}
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
CHECKOUT_PAYMENT_CHOICES = [
- ('default', 'Dummy provider')
-]
+ ('default', 'Dummy provider')]
MESSAGE_TAGS = {
- messages.ERROR: 'danger',
-}
+ messages.ERROR: 'danger'}
LOW_STOCK_THRESHOLD = 10
PAGINATE_BY = 16
+BOOTSTRAP3 = {
+ 'set_required': False,
+ 'success_css_class': ''}
+
TEST_RUNNER = ''
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', 'localhost').split()
diff --git a/saleor/static/scss/widget/_form.scss b/saleor/static/scss/widget/_form.scss
index 0a6ff1205a..d9f7b7bb94 100644
--- a/saleor/static/scss/widget/_form.scss
+++ b/saleor/static/scss/widget/_form.scss
@@ -20,10 +20,6 @@
display: initial;
}
- .price-wrapper {
- overflow: hidden;
- }
-
p.help-block {
margin: -7px 0 15px;
font-size: $label-font-size;
diff --git a/templates/dashboard/category/category_confirm_delete.html b/templates/dashboard/category/category_confirm_delete.html
index a93b709375..339bd32fe5 100644
--- a/templates/dashboard/category/category_confirm_delete.html
+++ b/templates/dashboard/category/category_confirm_delete.html
@@ -7,7 +7,7 @@
{% block body_class %}body-categories{% endblock %}
{% block content %}
- <form class="form form-horizontal" action="" method="post">
+ <form class="form form-horizontal" action="" method="post" novalidate>
{% csrf_token %}
<div class="row">
diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.html
index d1da4f9f91..7409b2d122 100644
--- a/templates/dashboard/category/detail.html
+++ b/templates/dashboard/category/detail.html
@@ -30,7 +30,7 @@
{% block menu_catalogue_class %} active{% endblock %}
{% block content %}
- <form method="post" id="form-category" enctype="multipart/form-data">
+ <form method="post" id="form-category" enctype="multipart/form-data" novalidate>
{% csrf_token %}
<div class="row">
<div class="col l8">
diff --git a/templates/dashboard/category/modal_delete.html b/templates/dashboard/category/modal_delete.html
index 9f5c5f620d..8ad46f0cbd 100644
--- a/templates/dashboard/category/modal_delete.html
+++ b/templates/dashboard/category/modal_delete.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% load mptt_tags %}
-<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-delete' pk=category.pk %}">
+<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-delete' pk=category.pk %}" novalidate>
{% csrf_token %}
<div class="modal-content">
<div class="row">
diff --git a/templates/dashboard/category/modal_edit.html b/templates/dashboard/category/modal_edit.html
index a273aeb390..dde2c5c135 100644
--- a/templates/dashboard/category/modal_edit.html
+++ b/templates/dashboard/category/modal_edit.html
@@ -2,7 +2,7 @@
{% load i18n %}
{% load mptt_tags %}
-<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-edit' root_pk=category.pk %}">
+<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-edit' root_pk=category.pk %}" novalidate>
{% csrf_token %}
<div class="modal-content">
<div class="row">
diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.html
index 765058cfda..c3c94aface 100644
--- a/templates/dashboard/customer/list.html
+++ b/templates/dashboard/customer/list.html
@@ -16,7 +16,7 @@
{% block menu_sales_class %} active{% endblock %}
{% block content %}
- <form method="get">
+ <form method="get" novalidate>
<div class="row">
{{ form.email|materializecss:"s12 m3 l3" }}
{{ form.name|materializecss:"s12 m3 l3" }}
diff --git a/templates/dashboard/discount/sale_confirm_delete.html b/templates/dashboard/discount/sale_confirm_delete.html
index 7835d01274..962d8de6b6 100644
--- a/templates/dashboard/discount/sale_confirm_delete.html
+++ b/templates/dashboard/discount/sale_confirm_delete.html
@@ -12,7 +12,7 @@
{% block content %}
<p>{% trans "Are you sure you want to delete the following sale?" %}</p>
- <form method="post">
+ <form method="post" novalidate>
{% csrf_token %}
<div class="row">
<ul class="collection">
diff --git a/templates/dashboard/discount/sale_form.html b/templates/dashboard/discount/sale_form.html
index aaf4fc7b02..ff1cb716e7 100644
--- a/templates/dashboard/discount/sale_form.html
+++ b/templates/dashboard/discount/sale_form.html
@@ -42,7 +42,7 @@
{% block menu_discounts_class %} active{% endblock %}
{% block content %}
- <form method="post" enctype="multipart/form-data" id="form-sales">
+ <form method="post" enctype="multipart/form-data" id="form-sales" novalidate>
<div class="row">
<div class="col l8">
<div class="row">
diff --git a/templates/dashboard/discount/sale_modal_confirm_delete.html b/templates/dashboard/discount/sale_modal_confirm_delete.html
index e72d4dc239..20c6e83501 100644
--- a/templates/dashboard/discount/sale_modal_confirm_delete.html
+++ b/templates/dashboard/discount/sale_modal_confirm_delete.html
@@ -1,6 +1,6 @@
{% load i18n %}
-<form action="{% url "dashboard:sale-delete" pk=sale.pk %}" method="post">
+<form action="{% url "dashboard:sale-delete" pk=sale.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>{% trans "Are you sure?" %}</h5>
diff --git a/templates/dashboard/discount/voucher_form.html b/templates/dashboard/discount/voucher_form.html
index 83e9d7b4b1..cb911828f5 100644
--- a/templates/dashboard/discount/voucher_form.html
+++ b/templates/dashboard/discount/voucher_form.html
@@ -41,7 +41,7 @@
{% block menu_discounts_class %} active{% endblock %}
{% block content %}
- <form method="post" enctype="multipart/form-data" id="form-vouchers">
+ <form method="post" enctype="multipart/form-data" id="form-vouchers" novalidate>
{% csrf_token %}
{% if form.non_field_errors %}
<blockquote>
diff --git a/templates/dashboard/discount/voucher_modal_confirm_delete.html b/templates/dashboard/discount/voucher_modal_confirm_delete.html
index 42a6b7408a..f4f2c57daa 100644
--- a/templates/dashboard/discount/voucher_modal_confirm_delete.html
+++ b/templates/dashboard/discount/voucher_modal_confirm_delete.html
@@ -1,6 +1,6 @@
{% load i18n %}
-<form action="{% url "dashboard:voucher-delete" pk=voucher.pk %}" method="post">
+<form action="{% url "dashboard:voucher-delete" pk=voucher.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>{% trans "Are you sure?" %}</h5>
diff --git a/templates/dashboard/includes/_status_filters.html b/templates/dashboard/includes/_status_filters.html
index 5079eb6ec3..10d47e3d53 100644
--- a/templates/dashboard/includes/_status_filters.html
+++ b/templates/dashboard/includes/_status_filters.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% load materializecss %}
-<form method="get">
+<form method="get" novalidate>
<div class="row">
{{ form|materializecss:"s8 m4" }}
<div class="col s4 m2 left-align">
diff --git a/templates/dashboard/order/modal_add_note.html b/templates/dashboard/order/modal_add_note.html
index 67ad942792..af6a232ae7 100644
--- a/templates/dashboard/order/modal_add_note.html
+++ b/templates/dashboard/order/modal_add_note.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% load materializecss %}
-<form role="form" method="post" action="{% url 'dashboard:order-add-note' order_pk=order.pk %}" class="form-async">
+<form role="form" method="post" action="{% url 'dashboard:order-add-note' order_pk=order.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>{% trans "Add note" %}</h5>
diff --git a/templates/dashboard/order/modal_address_edit.html b/templates/dashboard/order/modal_address_edit.html
index 8755e0e04f..e06cafefb8 100644
--- a/templates/dashboard/order/modal_address_edit.html
+++ b/templates/dashboard/order/modal_address_edit.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% load materializecss %}
-<form class="form-async" role="form" method="post" action="{% url 'dashboard:address-edit' order_pk=order.pk address_type=address_type %}">
+<form class="form-async" role="form" method="post" action="{% url 'dashboard:address-edit' order_pk=order.pk address_type=address_type %}" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>
diff --git a/templates/dashboard/order/modal_cancel_delivery_group.html b/templates/dashboard/order/modal_cancel_delivery_group.html
index 62690a2819..52c3f4a444 100644
--- a/templates/dashboard/order/modal_cancel_delivery_group.html
+++ b/templates/dashboard/order/modal_cancel_delivery_group.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% load materializecss %}
-<form id="ship-delivery-group-form" method="post" role="form" action="{% url 'dashboard:cancel-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async">
+<form id="ship-delivery-group-form" method="post" role="form" action="{% url 'dashboard:cancel-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
diff --git a/templates/dashboard/order/modal_cancel_line.html b/templates/dashboard/order/modal_cancel_line.html
index 6773dc18d2..70da67dafe 100644
--- a/templates/dashboard/order/modal_cancel_line.html
+++ b/templates/dashboard/order/modal_cancel_line.html
@@ -2,7 +2,7 @@
{% load materializecss %}
{% load prices_i18n %}
-<form class="form-async" role="form" method="post" action="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}">
+<form class="form-async" role="form" method="post" action="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>{% trans "Cancer order line?" %}</h5>
diff --git a/templates/dashboard/order/modal_cancel_order.html b/templates/dashboard/order/modal_cancel_order.html
index d4fc0c3633..34470acba8 100644
--- a/templates/dashboard/order/modal_cancel_order.html
+++ b/templates/dashboard/order/modal_cancel_order.html
@@ -11,7 +11,7 @@
<div class="modal-footer">
<form id="release-form" method="post" role="form" class="form-async"
- action="{% url 'dashboard:order-cancel' order_pk=order.pk %}">
+ action="{% url 'dashboard:order-cancel' order_pk=order.pk %}" novalidate>
{% csrf_token %}
<button type="submit" class="modal-action btn-flat red-text">{% trans "Cancel Order" %}</button>
<a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>
diff --git a/templates/dashboard/order/modal_capture.html b/templates/dashboard/order/modal_capture.html
index 0aa58df050..5d20baf0b6 100644
--- a/templates/dashboard/order/modal_capture.html
+++ b/templates/dashboard/order/modal_capture.html
@@ -3,7 +3,7 @@
{% load materializecss %}
{% load prices_i18n %}
-<form role="form" method="post" action="{% url 'dashboard:capture-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async">
+<form role="form" method="post" action="{% url 'dashboard:capture-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
diff --git a/templates/dashboard/order/modal_change_quantity.html b/templates/dashboard/order/modal_change_quantity.html
index 6bd519e127..c02dfbb00a 100644
--- a/templates/dashboard/order/modal_change_quantity.html
+++ b/templates/dashboard/order/modal_change_quantity.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% load materializecss %}
-<form method="post" role="form" action="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=object.pk %}" class="form-async">
+<form method="post" role="form" action="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=object.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>{% trans "Change quantity" %}</h5>
diff --git a/templates/dashboard/order/modal_order_remove_voucher.html b/templates/dashboard/order/modal_order_remove_voucher.html
index a67b6b7ec6..6e508966be 100644
--- a/templates/dashboard/order/modal_order_remove_voucher.html
+++ b/templates/dashboard/order/modal_order_remove_voucher.html
@@ -11,7 +11,7 @@
<div class="modal-footer">
<form id="release-form" method="post" role="form" class="form-async"
- action="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}">
+ action="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}" novalidate>
{% csrf_token %}
<button type="submit" class="modal-action btn-flat red-text">{% trans "Remove voucher" %}</button>
<a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>
diff --git a/templates/dashboard/order/modal_refund.html b/templates/dashboard/order/modal_refund.html
index f910e3c4a2..86fbf40b9b 100644
--- a/templates/dashboard/order/modal_refund.html
+++ b/templates/dashboard/order/modal_refund.html
@@ -3,7 +3,7 @@
{% load materializecss %}
{% load prices_i18n %}
-<form role="form" method="post" action="{% url 'dashboard:refund-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async">
+<form role="form" method="post" action="{% url 'dashboard:refund-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
diff --git a/templates/dashboard/order/modal_release.html b/templates/dashboard/order/modal_release.html
index c49e859b2e..771b125833 100644
--- a/templates/dashboard/order/modal_release.html
+++ b/templates/dashboard/order/modal_release.html
@@ -9,7 +9,7 @@
<div class="modal-footer">
<form id="release-form" method="post" role="form" class="form-async"
- action="{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}">
+ action="{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}" novalidate>
{% csrf_token %}
<button type="submit" class="modal-action btn-flat blue-text">{% trans "Release" %}</button>
diff --git a/templates/dashboard/order/modal_ship_delivery_group.html b/templates/dashboard/order/modal_ship_delivery_group.html
index 523a204835..7391e1f551 100644
--- a/templates/dashboard/order/modal_ship_delivery_group.html
+++ b/templates/dashboard/order/modal_ship_delivery_group.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% load materializecss %}
-<form id="ship-delivery-group-form" method="post" role="form" action="{% url 'dashboard:ship-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async">
+<form id="ship-delivery-group-form" method="post" role="form" action="{% url 'dashboard:ship-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async" novalidate>
{% csrf_token %}
<div class="modal-content">
diff --git a/templates/dashboard/order/modal_split_order_line.html b/templates/dashboard/order/modal_split_order_line.html
index 41f6c70dd0..01fc8d84a1 100644
--- a/templates/dashboard/order/modal_split_order_line.html
+++ b/templates/dashboard/order/modal_split_order_line.html
@@ -2,7 +2,7 @@
{% load materializecss %}
<form method="post" role="form" class="form-async"
- action="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=line_pk %}">
+ action="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=line_pk %}" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>{% trans "Split order line " %}</h5>
diff --git a/templates/dashboard/product/attributes/confirm_delete.html b/templates/dashboard/product/attributes/confirm_delete.html
index 80e4bc1ab4..6070c07ddd 100644
--- a/templates/dashboard/product/attributes/confirm_delete.html
+++ b/templates/dashboard/product/attributes/confirm_delete.html
@@ -12,7 +12,7 @@
{% block content %}
<p>{% trans "Are you sure you want to delete the following attribute?" %}</p>
- <form method="post">
+ <form method="post" novalidate>
{% csrf_token %}
<div class="row">
<ul class="collection">
diff --git a/templates/dashboard/product/attributes/form.html b/templates/dashboard/product/attributes/form.html
index ac4e4c350f..622627a4c3 100644
--- a/templates/dashboard/product/attributes/form.html
+++ b/templates/dashboard/product/attributes/form.html
@@ -38,7 +38,7 @@
{% block menu_catalogue_class %} active{% endblock %}
{% block content %}
- <form method="post" enctype="multipart/form-data" id="form-attributes">
+ <form method="post" enctype="multipart/form-data" id="form-attributes" novalidate>
<div class="row">
<div class="col l8">
<div class="row">
diff --git a/templates/dashboard/product/attributes/modal_confirm_delete.html b/templates/dashboard/product/attributes/modal_confirm_delete.html
index 30879e04b4..73c8fe552a 100644
--- a/templates/dashboard/product/attributes/modal_confirm_delete.html
+++ b/templates/dashboard/product/attributes/modal_confirm_delete.html
@@ -1,6 +1,6 @@
{% load i18n %}
-<form action="{% url "dashboard:product-attribute-delete" pk=attribute.pk %}" method="post">
+<form action="{% url "dashboard:product-attribute-delete" pk=attribute.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
<h5>{% trans "Are you sure?" %}</h5>
diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.html
index 9fcfceabb7..80a11321d9 100644
--- a/templates/dashboard/product/list.html
+++ b/templates/dashboard/product/list.html
@@ -16,7 +16,7 @@
<i class="material-icons">add</i>
</a>
{% else %}
- <form method="post" action=".">
+ <form method="post" novalidate>
<div hidden>
{% csrf_token %}
{{ form }}
@@ -66,7 +66,7 @@
</div>
<div id="modal-product-class" class="modal">
<div class="modal-content">
- <form method="post" action=".">
+ <form method="post" novalidate>
{% csrf_token %}
<div class="row">
{{ form|materializecss }}
diff --git a/templates/dashboard/product/modal_product_confirm_delete.html b/templates/dashboard/product/modal_product_confirm_delete.html
index 712fae6c55..d3e47dc879 100644
--- a/templates/dashboard/product/modal_product_confirm_delete.html
+++ b/templates/dashboard/product/modal_product_confirm_delete.html
@@ -2,7 +2,7 @@
{% load prices_i18n %}
{% load staticfiles %}
-<form action="{% url "dashboard:product-delete" pk=product.pk %}" method="post">
+<form action="{% url "dashboard:product-delete" pk=product.pk %}" method="post" novalidate>
{% csrf_token %}
<div class="modal-content">
<div class="row">
diff --git a/templates/dashboard/product/modal_product_image_confirm_delete.html b/templates/dashboard/product/modal_product_image_confirm_delete.html
index d4a2eaa439..81f604d0b2 100644
--- a/templates/dashboard/product/modal_product_image_confirm_delete.html
+++ b/templates/dashboard/product/modal_product_image_confirm_delete.html
@@ -1,6 +1,6 @@
{% load i18n %}
-<form action="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=product_image.pk %}" method="post">
+<form action="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=product_image.pk %}" method="post" novalidate>
{% csrf_token %}
<input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">
diff --git a/templates/dashboard/product/product_confirm_delete.html b/templates/dashboard/product/product_confirm_delete.html
index 537556ad0c..7f94d9fa1f 100644
--- a/templates/dashboard/product/product_confirm_delete.html
+++ b/templates/dashboard/product/product_confirm_delete.html
@@ -26,7 +26,7 @@
{% block menu_catalogue_class %} active{% endblock %}
{% block content %}
- <form action="" method="post">
+ <form method="post" novalidate>
{% csrf_token %}
<div class="row">
<div class="col m6 l4">
diff --git a/templates/dashboard/product/product_form.html b/templates/dashboard/product/product_form.html
index d6361ae8fa..b04884fb44 100644
--- a/templates/dashboard/product/product_form.html
+++ b/templates/dashboard/product/product_form.html
@@ -82,7 +82,7 @@
{% endif %}
<div class="row tab-content" id="details">
- <form method="post" id="form-product" enctype="multipart/form-data">
+ <form method="post" id="form-product" enctype="multipart/form-data" novalidate>
{% csrf_token %}
{{ product_form.name|materializecss:"s12 m8" }}
{{ product_form.price|materializecss:"s12 m4" }}
@@ -116,7 +116,7 @@
{% if product.pk %}
<div id="variants" class="card tab-content">
- <form method="post" action="{% url 'dashboard:variant-bulk-delete' product_pk=product.pk %}">
+ <form method="post" action="{% url 'dashboard:variant-bulk-delete' product_pk=product.pk %}" novalidate>
{% csrf_token %}
<div class="data-table-header">
<a href="{% url 'dashboard:variant-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked blue-text">
@@ -198,7 +198,7 @@
</div>
<div id="stock" class="card tab-content">
- <form method="post" action="{% url 'dashboard:stock-bulk-delete' product_pk=product.pk %}">
+ <form method="post" action="{% url 'dashboard:stock-bulk-delete' product_pk=product.pk %}" novalidate>
{% csrf_token %}
<div class="data-table-header">
<a href="{% url 'dashboard:product-stock-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked blue-text">
@@ -273,10 +273,10 @@
</form>
</div>
- <div id="images" class="tab-content">
+ <div id="images" class="tab-content">
<div class="row">
<div class="col l12">
- <form action="{% url 'dashboard:product-images-upload' product_pk=product.pk %}" class="dropzone" id="product-image-form">
+ <form action="{% url 'dashboard:product-images-upload' product_pk=product.pk %}" class="dropzone" id="product-image-form" novalidate>
<div class="dz-message"></div>
{% csrf_token %}
<input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">
@@ -324,7 +324,7 @@
</ul>
</form>
</div>
- </div>
+ </div>
<script type="application/template" id="template">
<li class="col s6 m3 card product-gallery-item dz-preview dz-file-preview" data-id="{{ image.pk }}">
diff --git a/templates/dashboard/product/product_image_confirm_delete.html b/templates/dashboard/product/product_image_confirm_delete.html
index b8dec9a933..83b59ab6bf 100644
--- a/templates/dashboard/product/product_image_confirm_delete.html
+++ b/templates/dashboard/product/product_image_confirm_delete.html
@@ -19,7 +19,7 @@
{% endblock %}
{% block content %}
- <form method="post">
+ <form method="post" novalidate>
{% csrf_token %}
<input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">
<div class="row">
diff --git a/templates/materializecssform/field.html b/templates/materializecssform/field.html
index 1bea5b6e6e..9330b1744b 100644
--- a/templates/materializecssform/field.html
+++ b/templates/materializecssform/field.html
@@ -9,8 +9,7 @@
<p>
{% if field.auto_id %}
{{ field }}
- <label for="{{ field.auto_id }}"
- {% if field.field.required and form.required_css_class %}class="{{ form.required_css_class }}"{% endif %}>
+ <label for="{{ field.auto_id }}">
{{ field.label }}
</label>
{% endif %}
@@ -73,8 +72,7 @@
<div class="input col {{ classes.label }}">
{% if field|is_checkbox_select_multiple %}
{% if field.auto_id %}
- <label class="control-label {{ classes.label }}
- {% if field.field.required %}{{ form.required_css_class }}{% endif %}">{{ field.label }}</label>
+ <label class="control-label {{ classes.label }}">{{ field.label }}</label>
{% endif %}
<div class="{{ classes.value }}">
{% for choice in field %}
@@ -138,8 +136,7 @@
<div class="input col {{ classes.label }}">
<p>
{% if field.auto_id %}
- <label class="{{ classes.label }}
- {% if field.field.required %}{{ form.required_css_class }}{% endif %}"
+ <label class="{{ classes.label }}"
for="{{ field.auto_id }}">{{ field.label }}</label><br>
{% endif %}
{{ field }}
@@ -160,7 +157,7 @@
name="{{ field.name }}_1" type="hidden">
</div>
<div class="file-path-wrapper">
- <input class="file-path validate" type="text">
+ <input class="file-path" type="text">
</div>
{% for error in field.errors %}
<p class="help-block materialize-red-text">{{ error }}</p>
@@ -176,13 +173,11 @@
{% else %}
<div class="input input-field col {{ classes.label }}">
- <div class="price-wrapper">
- {{ field }}
- {% if field.auto_id %}
- <label class="active{% if not field.field.required %} optional{% endif %}"
- for="{{ field.auto_id }}">{{ field.label }}</label>
- {% endif %}
- </div>
+ {% if field.auto_id %}
+ <label class="active{% if not field.field.required %} optional{% endif %}"
+ for="{{ field.auto_id }}">{{ field.label }}</label>
+ {% endif %}
+ {{ field }}
{% for error in field.errors %}
<p class="help-block materialize-red-text">{{ error }}</p>
diff --git a/templates/order/payment/default.html b/templates/order/payment/default.html
index e1a26745db..8bd237e652 100644
--- a/templates/order/payment/default.html
+++ b/templates/order/payment/default.html
@@ -7,7 +7,7 @@
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-body">
- <form id="payment-form" method="{{ form.method }}"{% if form.action %} action="{{ form.action }}"{% endif %}>
+ <form id="payment-form" method="{{ form.method }}"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
{% csrf_token %}
{{ form.media }}
{% bootstrap_form form %}
diff --git a/templates/order/payment/paypal-card.html b/templates/order/payment/paypal-card.html
index 09dd0e4bf0..0119a03442 100644
--- a/templates/order/payment/paypal-card.html
+++ b/templates/order/payment/paypal-card.html
@@ -5,7 +5,7 @@
{% load i18n %}
{% block forms %}
- <form method="post" class="form-horizontal">
+ <form method="post" class="form-horizontal" novalidate>
{% csrf_token %}
{% bootstrap_form form layout='horizontal' %}
<div class="form-group">
diff --git a/templates/order/payment/stripe.html b/templates/order/payment/stripe.html
index da8001457d..e90e757751 100644
--- a/templates/order/payment/stripe.html
+++ b/templates/order/payment/stripe.html
@@ -3,7 +3,7 @@
{% load i18n %}
{% block forms %}
-<form method="{{ form.method }}" class="form-horizontal"{% if form.action %} action="{{ form.action }}"{% endif %}>
+<form method="{{ form.method }}" class="form-horizontal"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
{% csrf_token %}
{{ form.media }}
{% bootstrap_form form layout='horizontal' %}
diff --git a/templates/product/details.html b/templates/product/details.html
index 95daa901d9..6d92db4ed3 100644
--- a/templates/product/details.html
+++ b/templates/product/details.html
@@ -61,7 +61,7 @@
{% if product.is_in_stock %}
{% block orderform %}
<form role="form" class="product-form form-vertical" method="post"
- action="{% url 'cart:add-to-cart' product_id=product.pk %}?next={{ product.get_absolute_url }}" >
+ action="{% url 'cart:add-to-cart' product_id=product.pk %}?next={{ product.get_absolute_url }}" novalidate>
{% csrf_token %}
{% bootstrap_form form %}
diff --git a/templates/registration/change_password.html b/templates/registration/change_password.html
index b7f15d68eb..f8930157a8 100644
--- a/templates/registration/change_password.html
+++ b/templates/registration/change_password.html
@@ -15,7 +15,7 @@
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-body">
- <form method="post">
+ <form method="post" novalidate>
{% csrf_token %}
<fieldset>
<legend>{% trans 'Change password' %}</legend>
diff --git a/templates/registration/login.html b/templates/registration/login.html
index 1b3ca985c2..2e750e0650 100644
--- a/templates/registration/login.html
+++ b/templates/registration/login.html
@@ -9,7 +9,7 @@
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-body">
- <form method="post" action="{% url 'registration:login' %}">
+ <form method="post" action="{% url 'registration:login' %}" novalidate>
{% csrf_token %}
<fieldset>
<legend>{% trans 'Log in' %}</legend>
diff --git a/templates/registration/request_email_confirmation.html b/templates/registration/request_email_confirmation.html
index 9697a6c5f7..f673c9bcd1 100644
--- a/templates/registration/request_email_confirmation.html
+++ b/templates/registration/request_email_confirmation.html
@@ -14,7 +14,7 @@
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-body">
- <form method="post">
+ <form method="post" novalidate>
{% csrf_token %}
<fieldset>
<legend>{% trans 'Register or reset your password' %}</legend>
diff --git a/templates/registration/set_password.html b/templates/registration/set_password.html
index 4ed577a5a8..9ac7cc1c8f 100644
--- a/templates/registration/set_password.html
+++ b/templates/registration/set_password.html
@@ -5,7 +5,7 @@
{% block title %}{% trans "Set password" %} — {{ block.super }}{% endblock %}
{% block content %}
-<form method="post" class="form-horizontal">
+<form method="post" class="form-horizontal" novalidate>
{% csrf_token %}
<fieldset>
<legend>{% trans 'Set password' %}</legend>
@@ -19,7 +19,7 @@
</div>
</div>
</form>
-<form method="post" class="form-horizontal">
+<form method="post" class="form-horizontal" novalidate>
{% csrf_token %}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
diff --git a/templates/userprofile/address-delete.html b/templates/userprofile/address-delete.html
index ecc2dbe062..0e37cd5a6b 100644
--- a/templates/userprofile/address-delete.html
+++ b/templates/userprofile/address-delete.html
@@ -25,7 +25,7 @@
</div>
</div>
- <form action="." method="post">
+ <form method="post" novalidate>
{% csrf_token %}
<button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
<a href="{% url 'profile:details' %}" class="btn btn-link">{% trans "Cancel" %}</a>
diff --git a/templates/userprofile/address-edit.html b/templates/userprofile/address-edit.html
index f449775865..f12d549e79 100644
--- a/templates/userprofile/address-edit.html
+++ b/templates/userprofile/address-edit.html
@@ -17,7 +17,7 @@
{% block content %}
<div class="row">
<div class="col-sm-8 col-sm-push-2">
- <form action="." method="post" novalidate>
+ <form method="post" novalidate>
{% csrf_token %}
<h4>{% trans "Address" %}</h4>
<br>
diff --git a/templates/userprofile/details.html b/templates/userprofile/details.html
index 19872a0b03..d14771b29d 100644
--- a/templates/userprofile/details.html
+++ b/templates/userprofile/details.html
@@ -36,7 +36,7 @@
{% if user.default_billing_address == address %}
<span class="label label-default">{% trans "Default" %}</span>
{% else %}
- <form method="post" action="{% url "profile:address-make-default" pk=address.pk purpose="billing" %}" class="form-inline form-horizontal">
+ <form method="post" action="{% url "profile:address-make-default" pk=address.pk purpose="billing" %}" class="form-inline form-horizontal" novalidate>
{% csrf_token %}
<button type="submit" class="btn btn-default btn-sm">{% trans "Make default" %}</button>
</form>
@@ -46,7 +46,7 @@
{% if user.default_shipping_address == address %}
<span class="label label-default">{% trans "Default" %}</span>
{% else %}
- <form method="post" action="{% url "profile:address-make-default" pk=address.pk purpose="shipping" %}" class="form-inline form-horizontal">
+ <form method="post" action="{% url "profile:address-make-default" pk=address.pk purpose="shipping" %}" class="form-inline form-horizontal" novalidate>
{% csrf_token %}
<button type="submit" class="btn btn-default btn-sm">{% trans "Make default" %}</button>
</form>