Skip to content

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

Fix label "for" attribute

Paweł Kowalewski65ce156e432e
diff --git a/saleor/core/templates/bootstrap/_field_horizontal.html b/saleor/core/templates/bootstrap/_field_horizontal.html
index 3c2b9a3c6a..010fb878b7 100644
--- a/saleor/core/templates/bootstrap/_field_horizontal.html
+++ b/saleor/core/templates/bootstrap/_field_horizontal.html
@@ -4,7 +4,7 @@
{% else %}
<div class="form-group {{ bound_field.html_name }}{% if bound_field.errors %} has-error{% endif %}{% if bound_field.field.required %} required{% endif %}">
{% if show_label %}
- <label class="col-sm-2 control-label" for="{{ bound_field.html_name }}_id">{{ bound_field.label }}</label>
+ <label class="col-sm-2 control-label" for="id_{{ bound_field.html_name }}">{{ bound_field.label }}</label>
{% endif %}
<div class="col-sm-10{% if not show_label %} col-sm-offset-2{% endif %}">
{% if input_type == "input" or input_type == "textarea" or input_type == "select" %}
diff --git a/saleor/core/templates/bootstrap/_field_vertical.html b/saleor/core/templates/bootstrap/_field_vertical.html
index e34d97cdb2..dd274b5e30 100644
--- a/saleor/core/templates/bootstrap/_field_vertical.html
+++ b/saleor/core/templates/bootstrap/_field_vertical.html
@@ -4,7 +4,7 @@
{% else %}
<div class="form-group {{ bound_field.html_name }}{% if bound_field.errors %} has-error{% endif %}{% if input_type == "input" %} has-feedback{% endif %}{% if bound_field.field.required %} required{% endif %}">
{% if show_label %}
- <label class="control-label" for="{{ bound_field.html_name }}_id">{{ bound_field.label }}</label>
+ <label class="control-label" for="id_{{ bound_field.html_name }}">{{ bound_field.label }}</label>
{% endif %}
<div>
{% if input_type == "input" or input_type == "textarea" or input_type == "select" %}