{include file='r_basic/head.tpl' title=$title helpicon_name="documents" helpicon_color="green"}

{$in_create_mode=true}

<form id="corr_form_type_edit_form">
    <fieldset class="noborder noprint">
        <a class="dialog_make_text_btn ui-corner-all" onclick="correspondence.edit_html.save_form_type('{$corr_form_type->id}', false);">
            <span class="dialog_make_btn16 ok ui-corner-all"></span>
            {$i.basic_save}
        </a>
        <a class="dialog_make_text_btn ui-corner-all" onclick="correspondence.edit_html.save_form_type('{$corr_form_type->id}', true);">
            <span class="dialog_make_btn16 ok ui-corner-all"></span>
            {$i.basic_save} & {$i.basic_close}
        </a>
        <a class="dialog_make_text_btn ui-corner-all" onclick="usComm.windowOpen('{site_url url="/start/open/correspondence_edit/edit_form_type/`$xjxcookie`/{$corr_form_type->id}/print_pdf"}');">
            <span class="dialog_make_btn16 open_printpreview ui-corner-all"></span>
            {$i.basic_print_preview}
        </a>
        <span id="close_btn1_div" style="margin-left:20px;" class="ui-corner-all">
            <span id="close_btn1_msg"></span>
            <a class="dialog_make_text_btn ui-corner-all" onclick="window.onbeforeunload = null; window.close();" id="close_btn1">
                <span class="dialog_make_btn16 close ui-corner-all"></span>
                {$i.basic_close}
            </a>
        </span>
    </fieldset>
    <fieldset class="noborder sepnext">
        {include file='r/input.tpl' name="corr_form_type_title" title="correspondence_edit_title"
            default=$correspondence_title|escape:'html' class="t-mid"}
        {if $in_create_mode}
            {include file='r/input.tpl' name="corr_form_type_title_class" title="correspondence_edit_title_class"
                default=$correspondence_title_class class="t-mid"}
        {/if}
    </fieldset>
    {if $in_create_mode}
        <fieldset class="bordertop sepnext">
            {include file='r/input.tpl' name="corr_form_type_base" title="correspondence_edit_base"
                default=$correspondence_base class="t-mid"}
        </fieldset>
    {/if}
    <fieldset class="noborder sepnext">
        {include file='r/textarea.tpl' name="corr_form_type_header" title="correspondence_edit_header"
            default=$correspondence_header class="t-long midheight inittinymce mce_mode_corr"}
    </fieldset>
    <fieldset class="noborder sepnext">
        {include file='r/textarea.tpl' name="corr_form_type_body" title="correspondence_edit_body"
            default=$correspondence_body class="t-long bigheight inittinymce mce_mode_corr"}
    </fieldset>
    <fieldset class="noborder sepnext">
        {include file='r/textarea.tpl' name="corr_form_type_footer" title="correspondence_edit_footer"
            default=$correspondence_footer class="t-long midheight inittinymce mce_mode_corr"}
    </fieldset>
    <fieldset class="noborder noprint">
        <a class="dialog_make_text_btn ui-corner-all" onclick="correspondence.edit_html.save_form_type('{$corr_form_type->id}', false);">
            <span class="dialog_make_btn16 ok ui-corner-all"></span>
            {$i.basic_save}
        </a>
        <a class="dialog_make_text_btn ui-corner-all" onclick="correspondence.edit_html.save_form_type('{$corr_form_type->id}', true);">
            <span class="dialog_make_btn16 ok ui-corner-all"></span>
            {$i.basic_save} & {$i.basic_close}
        </a>
        <a class="dialog_make_text_btn ui-corner-all" onclick="usComm.windowOpen('{site_url url="/start/open/correspondence_edit/edit_form_type/`$xjxcookie`/{$corr_form_type->id}/print_preview"}');">
            <span class="dialog_make_btn16 open_printpreview ui-corner-all"></span>
            {$i.basic_print_preview}
        </a>
        <span id="close_btn2_div" style="margin-left:20px;" class="ui-corner-all">
            <span id="close_btn2_msg"></span>
            <a class="dialog_make_text_btn ui-corner-all" onclick="window.onbeforeunload = null; window.close();" id="close_btn2">
                <span class="dialog_make_btn16 close ui-corner-all"></span>
                {$i.basic_close}
            </a>
        </span>
    </fieldset>
</form>