|
|
|
|
@ -46,14 +46,14 @@ class ProductFilterForm(forms.Form): |
|
|
|
|
|
|
|
|
|
class ProductSearchForm(forms.ModelForm): |
|
|
|
|
field_template = 'bootstrap/forms/product_search.html' |
|
|
|
|
form_action = reverse_lazy('products:product_list') |
|
|
|
|
form_action = 'products:product_list' |
|
|
|
|
submit_css_class = None |
|
|
|
|
|
|
|
|
|
def __init__(self, *args, **kwargs): |
|
|
|
|
self.submit_css_class = kwargs.pop('submit_css_class') |
|
|
|
|
|
|
|
|
|
self.helper = FormHelper() |
|
|
|
|
self.helper.form_action = self.form_action |
|
|
|
|
self.helper.form_action = reverse_lazy(self.form_action) |
|
|
|
|
self.helper.form_method = 'get' |
|
|
|
|
self.helper.layout = Layout( |
|
|
|
|
Field('name', template=self.field_template, placeholder="Поиск программы..."), |
|
|
|
|
|