{if $is_q_plan}
    <div id="projectadmin_projectmail_form">
{else}
    <form id="projectadmin_projectmail_form" style=""
    action=""  method="POST" enctype="multipart/form-data"
    onsubmit="projectadmin_projectmail.save({$project_id}); return false;">
{/if}
<table style="width: 100%;">
    <colgroup>
        <col style="width: 75px;" />
        <col style="width: 30%" />
        <col />
    </colgroup>
    <thead>
        <tr>
            <th>
                <span onclick="projectadmin_projectmail.add();" class="dialog_make_btn16 add mobile_big smallbtns ui-corner-all" title="{$i.basic_add}"></span>
            </th>
            <th>{$i.filter_email_inbox_account}</th>
            <th>{$i.basic_mailinbox}</th>
            <th>{$i.basic_mailoutbox}</th>
            <th>{$i.projectadmin_project_mail_security}</th>
            <th>{$i.projectadmin_project_mail_delete}</th>
        </tr>
    </thead>
    <tbody>
        {foreach item="projectmail" from=$projectmail_info}
            <tr>
                <td>
                    <span class="dialog_make_btn16 edit smallbtns ui-corner-all"
                        onclick="projectadmin_projectmail.open_edit(this, {$projectmail->id});"
                        title="{$i.basic_edit} ({$projectmail->id})"></span>  
                    <span class="dialog_make_btn16 delete mobile_big smallbtns ui-corner-all"
                        onclick="projectadmin_projectmail.delete_item({$project_id}, {$projectmail->id});"
                        title="{$i.basic_delete}"></span>
                </td>
                <td>{$projectmail->email_account_email}</td>
                <td>{$projectmail->inbox}</td>
                <td>{$projectmail->outbox}</td>
                <td>{$projectmail->security_name}</td>
                {assign var="delete_eml" value="projectadmin_project_mail_delete_eml_`$projectmail->delete_after_save`"}
                <td style="text-align: center">{$i.$delete_eml}</td>
            </tr>
        {/foreach}
        <tr style="display: none;" id="projectadmin_projectmail_formrow">
            <td>
                <span onclick="projectadmin_projectmail.save({$project_id});" class="dialog_make_btn16 ok mobile_big smallbtns ui-corner-all" title="{$i.basic_add}"></span>
                <span onclick="projectadmin_projectmail.close({$project_id});" class="dialog_make_btn16 close mobile_big smallbtns ui-corner-all" title="{$i.basic_close}"></span>
                {include file='r/hidden.tpl' name="projectadmin_projectmail_edit" default=''}
            </td>
            <td>{include file='r/table_select.tpl' name="projectadmin_projectmail_email_account" default="" class="required"
                    list=$email_accounts id="id" text="email" filter_extra="onchange='projectadmin_projectmail.preselect_inbox_outbox();'"}</td>
            <td style="white-space:nowrap">
                {include file='r/table_input.tpl' name="projectadmin_projectmail_inbox" class="" default=""
                    add_icons_file="email_mbox_input" email_filter_name='projectadmin_projectmail_email_account' in_out=1}
            </td>
            <td style="white-space:nowrap">
                {include file='r/table_input.tpl' name="projectadmin_projectmail_outbox" class="" default=""
                    add_icons_file="email_mbox_input" email_filter_name='projectadmin_projectmail_email_account' in_out=2}
            </td>
            <td>{include file='r/table_select.tpl' name="projectadmin_projectmail_security"
                    list=$security id="id" text="name" class="required" noempty=TRUE}</td>
            <td style="text-align: center">{include file='r/table_select.tpl' name="projectadmin_projectmail_delete_after_save"
                    list=$delete_IMAP id="id" text="name" class="required" noempty=TRUE}
            </td>
        </tr>
    </tbody>
</table>
{if $is_q_plan}
    </div>
{else}      
    </form>
{/if}