Files
docuseal/app/views/shared/_search_input.html.erb
T

26 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-08-14 16:34:30 +03:00
<form action="<%= url_for %>" method="get" class="items-center flex">
2024-11-23 01:45:10 +02:00
<% Submissions::Filter::ALLOWED_PARAMS.each do |key| %>
<% if params[key].present? %>
<input name="<%= key %>" value="<%= params[key] %>" class="hidden">
<% end %>
<% end %>
2023-10-16 00:41:14 +03:00
<% if params[:q].present? %>
<div class="relative">
2026-02-14 17:42:08 +02:00
<a href="<%= url_for(params: request.query_parameters.except('q')) %>" title="<%= t('clear') %>" class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-auto text-neutral text-2xl font-extralight">
2023-09-24 17:49:24 +03:00
&times;
</a>
2023-10-16 00:41:14 +03:00
</div>
<% end %>
2025-09-24 12:07:54 +03:00
<search-input data-title="<%= local_assigns[:title_selector] || 'h1' %>" class="flex items-center">
2024-09-23 15:22:07 +03:00
<input id="search" name="q" value="<%= params[:q] %>" class="input text-lg pr-10 -mr-12 w-0 md:w-60 <%= 'pl-8 input-outlined w-60' if params[:q].present? %>" placeholder="<%= local_assigns[:placeholder] %>">
2025-09-24 12:07:54 +03:00
<button type="submit" title="<%= t('search') %>" class="btn btn-ghost btn-circle">
<span class="enabled">
<%= svg_icon('search', class: 'w-6 h-6 stroke-2') %>
</span>
<span class="disabled">
<%= svg_icon('loader', class: 'w-5 h-5 animate-spin') %>
</span>
</button>
2024-08-14 16:34:30 +03:00
</search-input>
2023-09-15 02:11:48 +03:00
</form>