From c00eabc552bfd468da1bddca24d81f85831f39d0 Mon Sep 17 00:00:00 2001 From: Max Yakovenko Date: Mon, 23 Jul 2018 02:38:54 +0300 Subject: [PATCH] add class selector dynamically to product search form --- templates/bootstrap/forms/product_search.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/bootstrap/forms/product_search.html b/templates/bootstrap/forms/product_search.html index 9b3c9ee..8ff9168 100644 --- a/templates/bootstrap/forms/product_search.html +++ b/templates/bootstrap/forms/product_search.html @@ -1,4 +1,10 @@ {% load static %} {% load crispy_forms_field %} -{% if input.name == "search" %}{% else %}{{ field }}{% endif %} +{% spaceless %} + {% if input.name == "search" %} + + {% else %} + {{ field }} + {% endif %} +{% endspaceless %}