    <div class="space"></div>
{include file=$webdoc.template_dir|cat:"message.tpl"}
{if !$no_display}
    <form method="get" action="">
{insert_form type="hidden" name="subpage1" value=$smarty.get.subpage1}
{insert_form type="hidden" name="subpage2" value=filter}
{include file=$webdoc.template_dir|cat:"pages_hidden.tpl"}
{include file=$webdoc.template_dir|cat:"sort_hidden.tpl"}
{include file=$webdoc.template_dir|cat:"columns_hidden.tpl"}
      <input type="submit" name="button_filtrate" value="Filtrate" style="display: none;">
      <table class="record">
        <tr><th colspan="2">Name:</th></tr><tr><td colspan="2">{insert_form type="text" name="name" value=$filter.name}</td></tr><tr class="space"><td colspan="2"></td></tr>
{if $webdoc.main_table=="requirement" || $webdoc.main_table=="product" }
        <tr><th colspan="2">{if $webdoc.main_table=="product"}Families{else}Categories{/if}:</th></tr><tr><td colspan="2">{insert_id_selections select_name="categories_id" buttons_name="category" select=$categories array_id=$filter.categories_id}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Parents:</th></tr><tr><td colspan="2">{insert_id_selections select_name="parents_id" buttons_name="parent" select=$parents array_id=$filter.parents_id}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
        <tr><th colspan="2">Created:</th></tr><tr><td class="nb-right nb-bottom">From: </td><td class="nb-bottom nb-left">{insert_form type="text" name="created_from" value=$filter.created_from}</td></tr><tr><td class="nb-top nb-right">To: </td><td class="nb-top nb-left">{insert_form type="text" name="created_to" value=$filter.created_to}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Creators:</th></tr><tr><td colspan="2">{insert_id_selections select_name="creators_id" buttons_name="creator" select=$creators array_id=$filter.creators_id}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Approved:</th></tr><tr><td class="nb-right nb-bottom">From: </td><td class="nb-bottom nb-left">{insert_form type="text" name="approved_from" value=$filter.approved_from}</td></tr><tr><td class="nb-top nb-right">To: </td><td class="nb-top nb-left">{insert_form type="text" name="approved_to" value=$filter.approved_to}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Approvers:</th></tr><tr><td colspan="2">{insert_id_selections select_name="approvers_id" buttons_name="approver" select=$approvers array_id=$filter.approvers_id}</td></tr><tr class="space"><td colspan="2"></td></tr>
{if $webdoc.main_table=="test_run"}
        <tr><th colspan="2">Tested:</th></tr><tr><td class="nb-right nb-bottom">From: </td><td class="nb-bottom nb-left">{insert_form type="text" name="tested_from" value=$filter.tested_from}</td></tr><tr><td class="nb-top nb-right">To: </td><td class="nb-top nb-left">{insert_form type="text" name="tested_to" value=$filter.tested_to}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Testers:</th></tr><tr><td colspan="2">{insert_id_selections select_name="testers_id" buttons_name="tester" select=$testers array_id=$filter.testers_id}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
{if $webdoc.main_table=="requirement"}
        <tr><th colspan="2">Active:</th></tr><tr><td colspan="2">{html_options name="active" options=$active_options selected=$filter.active}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
{if $webdoc.main_table=="test_run"}
        <tr><th colspan="2">SW Rev:</th></tr><tr><td colspan="2">{insert_form type="text" name="sw_rev" value=$filter.sw_rev}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">HW Rev:</th></tr><tr><td colspan="2">{insert_form type="text" name="hw_rev" value=$filter.hw_rev}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Setup:</th></tr><tr><td colspan="2">{insert_form type="text" name="setup" value=$filter.setup}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Result:</th></tr><tr><td colspan="2">{insert_form type="text" name="result" value=$filter.result}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Duration:</th></tr><tr><td colspan="2">{insert_form type="text" name="duration" value=$filter.duration}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
{if $webdoc.main_table!="test"}
        <tr><th colspan="2">Description:</th></tr><tr><td colspan="2">{insert_form type="text" name="description" value=$filter.description}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
{if $webdoc.main_table=="test"}
        <tr><th colspan="2">Acceptance criteria:</th></tr><tr><td colspan="2">{insert_form type="text" name="acceptance_criteria" value=$filter.acceptance_criteria}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
{if $webdoc.main_table=="test" || $webdoc.main_table=="requirement" || $webdoc.main_table=="product"}
        <tr><th colspan="2">Comments:</th></tr><tr><td colspan="2">{insert_form type="text" name="comments" value=$filter.comments}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
{if $webdoc.main_table=="test"}
        <tr><th colspan="2">Terminated:</th></tr><tr><td class="nb-right nb-bottom">From: </td><td class="nb-bottom nb-left">{insert_form type="text" name="terminate_from" value=$filter.terminate_from}</td></tr><tr><td class="nb-top nb-right">To: </td><td class="nb-top nb-left">{insert_form type="text" name="terminate_to" value=$filter.terminate_to}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Terminator:</th></tr><tr><td colspan="2">{insert_id_selections select_name="terminators_id" buttons_name="terminator" select=$terminators array_id=$filter.terminators_id}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
{if $webdoc.main_table=="requirement"}
        <tr><th colspan="2">Dependces:</th></tr><tr><td colspan="2">{insert_id_selections select_name="dependences_id" buttons_name="dependence" select=$dependences array_id=$filter.dependences_id}</td></tr><tr class="space"><td colspan="2"></td></tr>
        <tr><th colspan="2">Is product specific:</th></tr><tr><td colspan="2">{html_options name="is_product_specific" options=$is_product_specific_options selected=$filter.is_product_specific}</td></tr><tr class="space"><td colspan="2"></td></tr>
{/if}
        <tr><td colspan="2">{insert_form type="submit" name="button_filtrate" value="Filtrate"} {insert_form type="submit" name="button_clear" value="Clear"}</td><tr>
      </table>
    </form>
{/if}