{include file="themes/default/templates/html_top.tpl"}
<form action="report.php?id={$report.id}" method="post" id="report_form">
    <input type="hidden" name="csrf" value="{$csrf}">
    {if $error}
        <div style="margin:30px"><i>{$error}</i></div>
    {elseif $report.form}
        {eval var=$report.form}
    {/if}
</form>

{if $report.help}
<div id="legend_short" style="display: {if $legend_minimized}block{else}none{/if};">
    <span>{$lang.Legend_report} "{$report.name}"</span>
</div>
<div id="legend_full" style="display: {if $legend_minimized}none{else}block{/if};">
    <img id="legend_close" src="images/bullet.png" alt="{$lang.Cancel}">
    <p id="legend_title">{$lang.Description_of_report}</p>
    <p id="legend_text">{$legend.report.help}</p>
</div>
<script>
$(function(){
    $("#legend_short span").click(function(){
        $('#legend_short').hide();
        $('#legend_full').show();
        $.post("report.php?id={$cur_report}", { legend_status: 1, csrf: '{$csrf}' })
    });

    $("#legend_close").click(function(){
        $('#legend_full').hide();
        $('#legend_short').show();
        $.post("report.php?id={$cur_report}", { legend_status: 0, csrf: '{$csrf}' })
    });
});
</script>
{/if}