<%set set_focus = 'myform.tpl_dir'%> <%set book_mark = 'tpl_email'%> <%include include_header.html%>
<%include admin_template_include_menu.html%>
Edit Templates

<%GList::Tools::default_email_editor%> <%if bsave%> <%if save_as%> <%set template_file = $save_as%> <%else%> <%set template_file = $tpl_file%> <%endif%> <%if demo%> <%set msg = 'Template Editor has been disabled in the demo!'%> <%else%> <%if tpl_to eq '' or tpl_from eq '' or tpl_subject eq '' or tpl_body eq ''%> <%set error = 'Required fields are not specified!'%> <%else%> <%GT::Mail::Editor::tpl_save( dir => $tpl_dir, template => $selected_dir, file => $template_file, header => To => $tpl_to, header => Subject => $tpl_subject, header => From => $tpl_from, extra_headers => $extra_headers, body => $tpl_body )%> <%endif%> <%if error%> <%set msg = $error%> <%set color = red%> <%else%> <%set msg = "Template saved successfully."%> <%endif%> <%endif%> <%elsif bload%> <%GT::Mail::Editor::tpl_load( dir => $tpl_dir, template => $selected_dir, file => $tpl_file, header => To, header => From, header => Subject )%> <%if error%> <%set msg = $error%> <%set color = red%> <%else%> <%set loaded = 1%> <%endif%> <%endif%>
Templates Set <%dir_select%>
Templates <%select_list%>
To *
Subject *
From *
Extra Headers
E-mail body * *: required
<%if tpl_file%> <%endif%> <%if msg%><%msg%><%endif%>
<%hidden_objects%>
<%include include_footer.html%>