<form
	id="search_form_{{m.lib.containerId}}"
	class="search_form"
	onsubmit="return {{m.lib.fun('doSearch')}}(event);"
>
	<input
		type="text"
		name="search"
		class="search_term"
		id="search_{{m.lib.containerId}}"
		value="{{zenario.htmlspecialchars(m.lib.request.search)}}"
		placeholder="{{m.tuix.search_bar_placeholder|e}}"
		{{zenarioT.onChangeOrSearch()}}="return {{m.lib.fun('doSearch')}}(event);"
		oninput="
			searchTerm = this.value;
			var clearSearch = zenario.get('clear_search_{{m.lib.containerId}}');
			
			if (clearSearch) {
				var clearSearch = zenario.get('clear_search_{{m.lib.containerId}}');
				if (searchTerm) {
					clearSearch.style.display = 'block';
				} else {
					clearSearch.style.display = 'none';
				}
			}
		"
	/>
	<% if (m.tuix.search_button_message) { %>
		<input type="submit" value="{{m.tuix.search_button_message|e}}"/>
	<% } else { %>
		<input type="submit" value="&#xf002;"/>
	<% } %>

	<input id="clear_search_{{m.lib.containerId}}" type="button" class="clear_search" value="&#xf057;" onclick="
		{{m.lib.fun('doSearch')}}(event, '');
		return false;
	"
	<% if (m.lib.request.search) { %>
		style="display: block;"
	<% } else { %>
		style="display: none;"
	<% } %>
	/>
</form>