{include file="header.tpl.html"}

{if $update_result}
  <br />
  <center>
  <span class="default">
  {if $update_result == -1}
    <b>{t}An error occurred while trying to run your query{/t}</b>
  {elseif $update_result == 1}
    <b>{t}Thank you, the custom field values were updated successfully.{/t}</b>
  {/if}
  </span>
  </center>
  <script language="JavaScript">
  <!--
  {if $current_user_prefs.close_popup_windows == '1'}
  setTimeout('closeAndRefresh()', 2000);
  {/if}
  //-->
  </script>
  <br />
  {if not $current_user_prefs.close_popup_windows}
  <center>
    <span class="default"><a class="link" href="javascript:void(null);" onClick="javascript:closeAndRefresh();">{t}Continue{/t}</a></span>
  </center>
  {/if}
{else}
{literal}
<script language="JavaScript">
<!--
var custom_fields_info = new Array();
function validateForm(f)
{
    checkCustomFields(f);
}
//-->
</script>
{/literal}
<script language="JavaScript" src="js/dynamic_custom_field.js.php?iss_id={$smarty.get.issue_id}"></script>
<form name="custom_field_form" method="post" action="{$smarty.server.PHP_SELF}" onSubmit="javascript:return checkFormSubmission(this, 'validateForm');">
<input type="hidden" name="cat" value="update_values">
<input type="hidden" name="issue_id" value="{$smarty.get.issue_id}">
<table align="center" width="100%" cellpadding="3">
  <tr>
    <td>
      <table width="100%" cellspacing="1" cellpadding="2" border="0">
        <tr>
          <td colspan="2" class="default">
            <b>{t}Update Issue Details{/t}</b>
          </td>
        </tr>
        {include file="edit_custom_fields.tpl.html"}
        <tr>
          <td colspan="2" bgcolor="{$cell_color}">
            <input class="button" type="submit" value="{t}Update Values{/t}">&nbsp;&nbsp;
            <input class="button" type="button" value="{t}Close{/t}" onClick="javascript:window.close();">
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
{/if}

{include file="footer.tpl.html"}
