<{include file="file:admin_header.html"}>
<script type="text/javascript" charset="utf-8">
jQuery.noConflict();
<{if $mode == 2}>
jQuery(function(){
  jQuery('#<{$dirname}>_policy_quicksearchform :checkbox').attr('disabled', 'disabled');
});
<{/if}>
function showhide(id){
  if(document.getElementById){
    if(document.getElementById(id).style.display == 'block')
      document.getElementById(id).style.display = 'none';
    else
      document.getElementById(id).style.display = 'block';
  }
}
</script>
<form name="<{$dirname}>_policy_quicksearchform" id="<{$dirname}>_policy_quicksearchform" action="policy_quicksearch.php" method="post">
<input type="hidden" name="op" value="">
<input type="hidden" name="condition_id" value="<{$condition_id}>" />

<{$token_ticket}>
<div style="text-align: left; margin-left: 8px; margin-top: 15px;">
<table width="100%">
  <tr>
    <td style="width: 50%; text-align: left;" class="even">
      <{$smarty.const._AM_XOONIPS_POLICY_QUICKSEARCH_ITEM}>&nbsp;
       <input type="text" name="condition_name" size="20" maxlength="255" value="<{$condition_name}>" />
    </td>
  </tr>
</table>
</div>

<table width="100%" cellspacing="1" class="outer">
  <tbody>
  <tr>
    <th style="text-align: center;" class="head"><{$smarty.const._AM_XOONIPS_LABEL_SELECT}></th>
    <th style="text-align: left;" class="head"><{$smarty.const._AM_XOONIPS_LABEL_ITEMTYPE_DETAIL_NAME}></th>
    <th style="text-align: left;" class="head"><{$smarty.const._AM_XOONIPS_POLICY_ITEMFIELD_ID}></th>
  </tr>
  <{foreach item=itemfield from=$itemfields}>
  <tr class= "<{cycle values='odd,even'}>">
    <td style="text-align: center;">
      <{if $itemfield.select=='1'}>
      <input type="checkbox" name="checkbox_<{$itemfield.itemfieldid}>" value="1" checked <{if $condition_id == '1'}>disabled<{/if}> />
      <{else}>
      <input type="checkbox" name="checkbox_<{$itemfield.itemfieldid}>" value="1" />
      <{/if}>
    </td>
    <td style="text-align: left;"><{$itemfield.name|xoops_escape}>&nbsp;&nbsp;<{if $itemfield.editing ne ''}><span class="<{$dirname}>_diff"><{$smarty.const._AM_XOONIPS_LABEL_ITEMTYPE_EDITING}></span><{/if}></td>
    <td style="text-align: left;"><{$itemfield.xml|xoops_escape}></td>
  </tr>
  <{/foreach}>
  <{if count($itemfields)==0}>
  <tr>
    <td class="odd" colspan="3" style="text-align: center;">
      <span style="color: red; font-weight: bold;"><{$smarty.const._AM_XOONIPS_POLICY_ITEMTYPE_DETAIL_EMPTY}></span>
    </td>
  </tr>
  <{/if}>
  </tbody>
</table>

<div style="text-align: center; margin-top: 10px;">
<{if $mode == 1}>
  <input class="formButton" type="button" value="<{$smarty.const._AM_XOONIPS_LABEL_SAVE}>" onclick="this.form.op.value='save'; submit();"  <{if $condition_id == '1'}>disabled<{/if}> />&nbsp;
<{elseif $mode == 2}>
   <input class="formButton" type="button" value="<{$smarty.const._AM_XOONIPS_LABEL_DELETE}>" onclick="this.form.op.value='delete'; submit();" <{if $condition_id == '1'}>disabled<{/if}> />
<{/if}>
</div>
</form>
<{include file="file:admin_footer.html"}>
