Parcourir la source

Show boolean not required error (#3997)

It makes no sense to have a boolean attribute that is required, because it
makes people have to check that box for every product they edit. Now let's
also show people the error that will be thrown when that happens, for clarity.
master
Voxin Muyli il y a 3 ans
Parent
révision
311383c970
Aucun compte lié à l'adresse e-mail de l'auteur

+ 1
- 1
src/oscar/templates/oscar/dashboard/catalogue/product_class_form.html Voir le fichier

117
 
117
 
118
                                                         {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.option_group nolabel=True %}
118
                                                         {% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.option_group nolabel=True %}
119
                                                     </td>
119
                                                     </td>
120
-                                                    <td>{% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.required nolabel=True %}</td>
120
+                                                    <td>{% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.required nolabel=True %}{{ attribute_form.non_field_errors }}</td>
121
                                                     <td>{% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.DELETE nolabel=True %}</td>
121
                                                     <td>{% include 'oscar/dashboard/partials/form_field.html' with field=attribute_form.DELETE nolabel=True %}</td>
122
                                                 </tr>
122
                                                 </tr>
123
                                             {% endfor %}
123
                                             {% endfor %}

Chargement…
Annuler
Enregistrer