<%Links::Tools::editor_size%> <%set font_tag = ''%> Gossamer Links - Build - Email Templates <%set template_root = $config.admin_root_path%> <%set template_root .= "/templates"%> <%set setcookie = 'set-cookie'%> <%if save_template%> <%if save_as%> <%set template_file = $save_as%> <%set tpl_file = $save_as%> <%else%> <%set template_file = $tpl_file%> <%endif%> <%GT::Mail::Editor::tpl_save( dir => $template_root, template => $tpl_dir, file => $template_file, header => To => $header_To, header => Subject => $header_Subject, header => From => $header_From, extra_headers => $extra_headers, body => $body )%> <%if error%> <%set error_message = "Unable to save template: $error"%> <%set display_template = 1%><%-- All the variables will still be there, left over from whatever we just submitted --%> <%else%> <%set save_as = ""%> <%set success_message = "Template saved successfully"%> <%GT::Mail::Editor::tpl_load( dir => $template_root, template => $tpl_dir, file => $template_file, header => To, header => Subject, header => From )%> <%if error%> <%set error_message = "Unable to load template: $error"%> <%else%> <%set displaying_template = 1%> <%endif%> <%endif%> <%elsif load_template%> <%if not tpl_file%> <%set error_message = "Unable to load template: No template selected"%> <%else%> <%GT::Mail::Editor::tpl_load( dir => $template_root, template => $tpl_dir, file => $tpl_file, header => To, header => From, header => Subject )%> <%if error%> <%set error_message = "Unable to load template: $error"%> <%else%> <%set displaying_template = 1%> <%endif%> <%endif%> <%elsif restore_template%> <%if not tpl_file%> <%set error_message = "Unable to restore template: No template specified"%> <%else%> <%GT::Mail::Editor::tpl_delete( dir => $template_root, template => $tpl_dir, file => $tpl_file, )%> <%if error%> <%set error_message = "Unable to restore template: $error"%> <%set displaying_template = 1%> <%else%> <%set success_message = "Template restored successfully"%> <%endif%> <%GT::Mail::Editor::tpl_load( dir => $template_root, template => $tpl_dir, file => $tpl_file, header => To, header => Subject, header => From )%> <%if error%> <%set error_message = "Unable to load template: $error"%> <%else%> <%set displaying_template = 1%> <%endif%> <%endif%> <%elsif delete_template%> <%if not tpl_file%> <%set error_message = "Unable to delete template: No template specified"%> <%else%> <%GT::Mail::Editor::tpl_delete( dir => $template_root, template => $tpl_dir, file => $tpl_file, )%> <%if error%> <%set error_message = "Unable to delete template: $error"%> <%set displaying_template = 1%> <%else%> <%set success_message = "Template deleted successfully"%> <%endif%> <%endif%> <%elsif in.$setcookie%> <%set displaying_template = 1%> <%endif%>
<%font_tag%>Email Templates

<%font_tag%>Email Templates

<%font_tag%>From here you can quickly edit the e-mail templates for any e-mails sent. <%if success_message%>

<%font_tag%><%success_message%>

<%endif%> <%if error_message%>

<%font_tag%><%error_message%>

<%endif%>

<%Links::Tools::tpl_dir_select($tpl_dir, 'browser')%> <%Links::Tools::tpl_file_select($tpl_dir, '', '.*\.eml')%>

<%font_tag%>Currently working on template set:

<%font_tag%>Available templates:

<%font_tag%>* modified template
+ non-default template

<%if tpl_local%>

<%font_tag%>Template actions: <%if tpl_new_local%>diff or Restore<%else%>Delete<%endif%>

<%endif%>
<%font_tag%>To:
<%font_tag%>From:
<%font_tag%>Subject:
<%font_tag%>Extra Headers:
<%font_tag%>Body:

<%font_tag%>Save template as:

<%font_tag%>Resize Textarea to: rows, columns