[REF] website(_event): allow to give a placeholder to website search box
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes in registration and event frontend flows. Also provide a quick back2basic in backend views to prepare addition of Online sub modules. SPECIFICATIONS Be more explicit in search boxes: allow to set a placeholder. It helps users understanding purpose of the search tool. Set it to "Search an event ..." in website_event. LINKS Community PR odoo/odoo#55197 Enterprise PR odoo/enterprise#12113 Task ID-2309702 (Event Preparatory Merge 4) Prepares Task ID-2252655 (Main Online Event task) Prepares Task ID-2283796 (Event B2Basics / Registration Flow) Prepares Task ID-2299857 (Event Design Review) Co-Authored-By: Aurélien Warnon <awa@odoo.com> Co-Authored-By: David Beguin <dbe@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
This commit is contained in:
co-authored by
Aurélien Warnon
David Beguin
parent
45dcd18647
commit
567bd4d9d9
@@ -1055,7 +1055,7 @@ Sitemap: <t t-esc="url_root"/>sitemap.xml
|
||||
|
||||
<template id="website_search_box" name="Website Searchbox">
|
||||
<div t-attf-class="input-group #{_classes}" role="search">
|
||||
<input type="search" name="search" class="search-query form-control oe_search_box" placeholder="Search..." t-att-value="search"/>
|
||||
<input type="search" name="search" class="search-query form-control oe_search_box" t-att-placeholder="placeholder if placeholder else 'Search...'" t-att-value="search"/>
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-primary oe_search_button" aria-label="Search" title="Search"><i class="fa fa-search"/></button>
|
||||
</div>
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
<span class="navbar-brand h4 my-0">Events</span>
|
||||
<ul class="o_wevent_index_topbar_filters nav"/>
|
||||
</div>
|
||||
<div class="col-lg-3 col-sm-12 d-flex align-items-center flex-wrap px16">
|
||||
<div class="col-lg-3 col-sm-12 d-flex align-items-center flex-wrap pl-3 pr-0">
|
||||
<t t-call="website_event.events_search_box">
|
||||
<t t-set="_searches" t-value="searches"/>
|
||||
<t t-set="_placeholder" t-value="'Search an event ...'"/>
|
||||
</t>
|
||||
<a href="/event" class="btn btn-info text-nowrap mr-0 w-100" role="button" title="Clear filters">
|
||||
<i class="fa fa-eraser"/> Clear filters
|
||||
@@ -154,6 +155,7 @@
|
||||
<form t-attf-class="o_wevent_event_searchbar_form o_wait_lazy_js w-100 my-1 my-lg-0 #{_classes}"
|
||||
t-att-action="action if action else '/event'" method="get">
|
||||
<t t-set="search" t-value="search or _searches and _searches['search']"/>
|
||||
<t t-set="placeholder" t-value="placeholder or _placeholder"/>
|
||||
<t>$0</t>
|
||||
<t t-foreach="_searches" t-as="search">
|
||||
<input t-if="search != 'search' and search_value != 'all'" type="hidden"
|
||||
|
||||
Reference in New Issue
Block a user