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

{if $self_assign_result}
  <br />
  <center>
  <span class="default">
  {if $self_assign_result == -1}
    <b>{t}An error occurred while trying to run your query{/t}</b>
  {elseif $self_assign_result == 1}
    <b>{t}Thank you, you are now assigned to the issue{/t} #{$issue_id}.</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}
<form name="assign_form" method="post" action="self_assign.php">
<input type="hidden" name="iss_id" value="{$issue_id}">
<table align="center" width="100%" cellpadding="3">
  <tr>
    <td>
      <table width="100%" cellspacing="0" cellpadding="2" border="0">
        <tr>
          <td colspan="2" class="default" style="font-weight: bold; color: red;" align="center">
            <span style="font-size: 140%">{t}WARNING{/t}</span><br />
            {t count=$assigned_users|@count plural="The following users are already assigned to this issue"}The following user is already assigned to this issue{/t}.<br />{","|join:$assigned_users}
          </td>
        </tr>
        <tr>
          <td bgcolor="{$dark_color}" align="right">
            <input type="radio" name="target" value="replace" checked>
          </td>
          <td class="default" bgcolor="{$dark_color}">
            <b><a id="link" class="link" href="javascript:void(null);" onClick="javascript:checkRadio('assign_form', 'target', 0);">
            {t count=$assigned_users|@count plural="Replace current assignees with Myself."}Replace current assignee with Myself.{/t}</a></b>
          </td>
        </tr>
        <tr>
          <td bgcolor="{$dark_color}" align="right" valign="top">
            <input type="radio" name="target" value="add">
          </td>
          <td bgcolor="{$dark_color}" class="default">
            <b><a id="link" class="link" href="javascript:void(null);" onClick="javascript:checkRadio('assign_form', 'target', 1);">
            {t}Add Myself to list of assignees.{/t}</a></b>
          </td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="{$cell_color}" align="right">
            <input type="submit" value="{t}Continue{/t} &gt;&gt;" class="button">
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
{/if}

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