<%= error_messages_for 'textfilter' %>
<!--[form:textfilter]-->
<fieldset class="list">
	<legend>Description</legend>
<ul>
	<li>
  	<label class="float" for="textfilter_name"><%= _("Name") %>:</label>
  	<%= text_field 'textfilter', 'name', :size => 40  %>
	</li>
	<li>
  	<label class="float" for="textfilter_description"><%= _("Description") %>:</label>
  	<%= text_field 'textfilter', 'description', :size => 40  %>
	</li>
	<li>
		<label class="float" for="markup"><%= _("Markup type")%>:</label>
		<select name="textfilter[markup]">
		<% @markup_options.each do |filter| -%>
		  <option value="<%=h filter[0] %>" <% if @textfilter.markup == filter[0] %>selected<% end %>><%= filter[1] %></option>
		<% end -%>
		</select>
	</li>
</ul>
</fieldset>

<fieldset class="list set">
	<legend><%= _("Post-processing filters")%></legend>
<table style="margin-top: 15px">
	<th colspan="2" class="first"><%= _("Name") %></th>
	<th class="last">Description</th>
<% @postprocess_options.sort_by {|f| f[1]}.each do |filter| %>
  <tr <%= alternate_class %>>
  <td class="first"><input name="filter[<%= filter[0] %>]" type="checkbox" value="1" <% if (filter[3]) %>checked="true"<% end %>/></td>
  <td><label title="<%=h filter[2] %>"><%= filter[1]%></label></td>
  <td class="last"><em><%= filter[2]%></em></td>
  </tr>
<% end -%>
</table>
</fieldset>

<fieldset class="set">
	<legend><%= _("Parameters")%></legend>
	<ul>
		<% @filterparams.keys.sort.each do |key| -%>
		<li>
			<label class="float" for="params[<%= key %>]"  title="<%=h @filterhelp[key] %>"><%= @filterdescriptions[key] %></label>
			<% if @filteroptions[key].nil? -%>
			<input name="params[<%= key %>]" value="<%=h @filterparams[key] %>"/>
			<% else -%>
			<select name="params[<%= key %>]">
				<% for opt in @filteroptions[key] -%>
		    <option value="<%= opt.downcase.gsub(' ','_') %>"<%= %{ selected="selected"} if opt.downcase.gsub(' ','_') == @filterparams[key] %>><%= opt %></option>
				<% end -%>
			<% end -%>		
		  </select>
		</li>
		<% end -%>
	</ul>
</fieldset>

<!--[eoform:pages]-->
