|
31 | 31 | {# end of mobile header-menu with logo #}
|
32 | 32 |
|
33 | 33 | <div class="header__submenu">
|
34 |
| - {% if cms_apps.products %} |
35 |
| - {% if request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
| 34 | + {% if cms_apps.products and request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
36 | 35 | <nav class="header__actions header__actions--open" aria-label="Zoek navigatie mobiel">
|
37 |
| - {% url 'search:search' as search_url %} |
38 |
| - {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=False %} |
39 |
| - {% input search_form.query no_label=True %} |
40 |
| - {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
41 |
| - {% endrender_form %} |
| 36 | + <form id="search-form-mobile-open" class="search-form-delegate form form--inline"> |
| 37 | + {% input search_form.query no_label=True %} |
| 38 | + {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
| 39 | + </form> |
42 | 40 | </nav>
|
43 |
| - {% endif %} |
44 | 41 | {% endif %}
|
45 | 42 |
|
46 | 43 | <nav class="primary-navigation" aria-label="Hoofd navigatie">
|
|
111 | 108 |
|
112 | 109 | {% include "components/Header/PrimaryNavigation.html" %}
|
113 | 110 |
|
114 |
| - {% if cms_apps.products %} |
115 |
| - {% if request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
116 |
| - <nav class="header__actions" aria-label="Zoek navigatie desktop"> |
117 |
| - {% url 'search:search' as search_url %} |
118 |
| - {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=True %} |
119 |
| - {% input search_form.query no_label=True %} |
120 |
| - {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
121 |
| - {% endrender_form %} |
122 |
| - </nav> |
123 |
| - {% endif %} |
| 111 | + {% if cms_apps.products and request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
| 112 | + <nav class="header__actions" aria-label="Zoek navigatie desktop"> |
| 113 | + <form id="search-form-desktop" class="search-form-delegate form form--spaceless form--inline"> |
| 114 | + {% input search_form.query no_label=True %} |
| 115 | + {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
| 116 | + </form> |
| 117 | + </nav> |
124 | 118 | {% endif %}
|
125 | 119 |
|
126 | 120 | {% include "components/Header/NavigationAuthenticated.html" %}
|
127 | 121 | </div>
|
128 | 122 | {# end of header container #}
|
129 | 123 | </header>
|
130 | 124 |
|
131 |
| -{% if cms_apps.products %} |
132 |
| - {% if request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
133 |
| - <section class="search search__mobile search__mobile--closed"> |
134 |
| - <nav class="search__actions " aria-label="Zoek navigatie mobiel"> |
135 |
| - {% url 'search:search' as search_url %} |
136 |
| - {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=False %} |
137 |
| - {% input search_form.query no_label=True %} |
138 |
| - {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
139 |
| - {% endrender_form %} |
140 |
| - </nav> |
141 |
| - </section> |
142 |
| - {% endif %} |
| 125 | +{% if cms_apps.products and request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
| 126 | + <section class="search search__mobile search__mobile--closed"> |
| 127 | + <nav class="search__actions " aria-label="Zoek navigatie mobiel"> |
| 128 | + <form id="search-form-mobile-closed" class="search-form-delegate form form--inline"> |
| 129 | + {% input search_form.query no_label=True %} |
| 130 | + {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
| 131 | + </form> |
| 132 | + </nav> |
| 133 | + </section> |
143 | 134 | {% endif %}
|
0 commit comments