<%= form_tag({:controller => "wksurvey", :action => 'index'}, :method => :get, :id => 'filter_form') do %>
	<%=h hidden_field_tag('tab', "wksurvey") %>
	<fieldset>
		<% if checkEditSurveyPermission %>
			<div style="float:right">
					<%= link_to l(:label_new_survey), url_for(:project_id => params[:project_id], :controller => "wksurvey", :action => "edit"), :class => 'icon icon-add' %>
			</div>
		<% end %>
		<table>
			<tr>
				<th>
					<%= l(:label_survey_name) %>
					<%=h text_field_tag("survey_name", params[:survey_name], :size => "20px", :maxlength => 100) %>
				</th>
				<th style="padding-left: 10px;">
					<%= l(:field_status) %>
					<%=h select_tag('status', options_for_select(getSurveyStatus, :selected => params[:status])) %>
				</th>
				<% if params[:project_id].blank? && checkEditSurveyPermission %>
					<th style="padding-left: 10px;">
						<%= l(:label_survey_for) %>
						<%=h select_tag("survey_for", options_for_select(getSurveyFor, :selected => params[:survey_for].blank? ? params[:surveyForType] : params[:survey_for]), :onchange => '$("#filter_form").submit()') %>
					</th>
				<% end %>
			</tr>
		</table>
		<p style="padding-left:15px;">
			<%= link_to_function l(:button_apply), '$("#filter_form").submit()', :class => 'icon icon-checked' %>
			<%= link_to l(:button_clear), {tab: controller_name, clear: true}, :class => 'icon icon-reload' %>
		</p>
	</fieldset>
<% end %>