<div class="space"></div>
{include file=$webdoc.template_dir|cat:"message.tpl"}
{if !$no_display}
    <form method="post" action="">
      <table class="record" border=0>
        <tr><th>Name:</th></tr><tr><td>{insert_form type="text" name="name" value=$record.name}</td></tr><tr class="space"><td></td></tr>
        {if !$record.edit}<tr><th>Requirement ID:</th></tr><tr><td>{$record.requirement_id}{insert_form type="hidden" name="requirement_id" value=$record.requirement_id}</td></tr><tr class="space"><td></td></tr>{/if}
        <tr><th>Acceptance criteria:</th></tr><tr><td>{insert_form type="textarea" name="acceptance_criteria" value=$record.acceptance_criteria}</td></tr><tr class="space"><td></td></tr>
        <tr><th>Comments:</th></tr><tr><td>{insert_form type="textarea" name="comments" value=$record.comments}</td></tr><tr class="space"><td></td></tr>
        {if $record.edit}
        <tr><th>Connect with Requirement:</th></tr><tr>
        <td>{foreach from=$record_requirement_id item=row}{if count($record_requirement_id) > 1}{insert_form type="checkbox" name="requirement_has_test_id" value=$row.requirement_has_test_id}{$row.requirement_id}{else}{$row.requirement_id}<br>{/if}{/foreach}{if count($record_requirement_id) > 1} {insert_form type="submit" name="button_edit_delete" value="Delete Requirement"}<br>{/if}<br>
        <select name="requirement">{foreach from=$requirement item=row}<option label="{$row.name}" value="{$row.requirement_id}">{$row.name}</option>{/foreach}</select>{insert_form type="submit" name="button_edit_add" value="Add Requirement"}
        </td>
        </tr><tr class="space"><td></td></tr>
        {/if}
        <tr><td colspan="2">{if $record.edit}{insert_form type="hidden" name="test_id" value=$record.test_id}{insert_form type="submit" name="button_edit" value="Edit Test"}{else}{insert_form type="submit" name="button_save" value="Add new Test"}{/if}</td><tr>
      </table>
    </form>
{/if}