Actually show an error message if the template could not be saved

merge-requests/2/head
Mike Koch 9 years ago
parent afa279d98d
commit 6d62492cc7

@ -264,7 +264,7 @@ function save() {
$success = file_put_contents($filePath, $_POST['text']);
if ($success === false) {
hesk_process_messages($hesklang[''], 'manage_email_templates.php');
hesk_process_messages($hesklang['email_template_not_saved'], 'manage_email_templates.php');
} else {
$message = sprintf($hesklang['email_template_saved'], $_POST['template']);
hesk_process_messages($message,'manage_email_templates.php','SUCCESS');

@ -31,6 +31,7 @@ $hesklang['mods_for_hesk_acronym'] = 'MFH'; // THIS SHOULD NOT BE TRANSLATED
$hesklang['added_in_mods_for_hesk'] = 'Added in Mods for HESK';
$hesklang['statuses_intro'] = 'Here you can add, remove, and modify ticket statuses, as well as changing the default status for particular actions.';
$hesklang['statuses_saved'] = 'Ticket statuses have been updated!';
$hesklang['email_template_not_saved'] = 'The email template <b>%s</b> was NOT saved due to an error. Enable debug mode to see if an error message appears, and ensure that your file has CHMOD 0666'; // %s: Template file name
$hesklang['language_key'] = 'Language Key';
$hesklang['language_key_description'] = 'This is the language file \'key\' that contains the text you want to display';

Loading…
Cancel
Save