{extends "base_full.tpl.html"}
{block title}{t 1=$smarty.get.iss_id|intval}Issue #%1 - Edit Reporter{/t}{/block}

{block "content"}

<script type="text/javascript">
    <!--
    function validate()
    {
        if (!Validation.isEmail(Eventum.getField('email').val().trim())) {
            alert('{t escape=js}Please enter a valid email address.{/t}');
            Validation.selectField('email');
            return false;
        }
        return true;
    }
    //-->
</script>

<form name="reporter_form" onSubmit="return validate();" method="post">
    <input type="hidden" name="cat" value="update">
    <input type="hidden" name="issue_id" value="{$issue_id|intval}">
    <table class="bordered narrow">
        {if $core.current_role > $core.roles.reporter}
        <tr class="title">
            <th colspan="2">
                {t}Project Reporters{/t}
            </th>
        </tr>
        <tr>
            <th width="120">
                {t}Reporter{/t}:
            </th>
            <td>
                <input type="text" name="email" size="40" value="">
                {include file="error_icon.tpl.html" field="email"}
            </td>
        </tr>
        <tr class="buttons">
            <td colspan="2">
                <input class="button" type="submit" value="{t}Save Reporter{/t}">
                <input type="button" value="{t}Cancel{/t}" class="button" onClick="history.go(-1);">
            </td>
        </tr>
        {/if}
    </table>
</form>
{/block}
