summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-06-24 13:57:08 +0000
committerThibault Delavallée <tde@odoo.com>2020-07-31 15:35:32 +0000
commit567bd4d9d937245acbfaa50d7f089dee78b25f84 (patch)
treea66da47ee5793e807eb2d93c79a992a17adb9d15 /addons
parent45dcd186477e07cc2ca5b051958ddc30078f91b5 (diff)
[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>
Diffstat (limited to 'addons')
-rw-r--r--addons/website/views/website_templates.xml2
-rw-r--r--addons/website_event/views/event_templates.xml4
2 files changed, 4 insertions, 2 deletions
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index 163b811928e..849df56e298 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -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>
diff --git a/addons/website_event/views/event_templates.xml b/addons/website_event/views/event_templates.xml
index 7ae17e9f1a2..cbf795ee6ff 100644
--- a/addons/website_event/views/event_templates.xml
+++ b/addons/website_event/views/event_templates.xml
@@ -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"