<%# requirements: mode, project, keyword, case_insensitive, search_elements %>

<form action="<%= mode.url %>" method="<%= Config[:search_form_method] %>">

  <input type="text" name="keyword" size="20" value="<%= keyword.escape_h %>"> 
            <input type="submit" value="Search">

  <div style="margin-left:5em">
	Included fields:    
	<% project.report_type.find_all{|etype| etype.keyword_search?}.each do |etype| %>
      <!-- search_elements[<%= etype.id %>] = <%= search_elements[etype.id] %> -->
      <% checked = search_elements[etype.id] ? 'checked="checked"' : '' %>
      <input type="checkbox" name="<%= etype.id %>" <%= checked %>><%= etype.name %>
    <% end %>
    <br>
    <% checked = case_insensitive ? 'checked="checked"' : '' %>
    <input type="checkbox" name="case_insensitive" <%= checked %>> Case-insensitive
  </div>

  <div>
    <input type="hidden" name="project" value="<%= project.id %>">
    <input type="hidden" name="action" value="search">
    <input type="hidden" name="search_type" value="keyword">
    <% if @lang == 'ja' %>
    <input type="hidden" name="jp_enc_test" value="Æü">
    <% end %>
  </div>
</form>
