Don't allow empty search due to the course requirement 4

This commit is contained in:
Pfingstfrosch 2020-05-31 15:17:56 +02:00
parent 80bf9dbc5b
commit 72b9f7d7a0

View File

@ -1,9 +1,11 @@
<h2>Search through @TU Vienna Database</h2>
<p>Only people can be searched right now</p>
<p>Just enter your search term in the form below and pick your context.
We do the rest!</p>
<%= form_tag(crawlers_tiss_crawler_search_path, :method => "get") do %>
<%= label_tag(:search_term, "Enter your search term") %>
<%= text_field_tag(:search_term) %>
<%= text_field_tag(:search_term, nil, required: true, minlength: 1, placeholder: "...") %>
<%= radio_button_tag(:search_context, 'People', true) %> People
<%= radio_button_tag(:search_context, 'Courses', false) %> Courses
<%= radio_button_tag(:search_context, 'Theses', false) %> Theses