Bladeren bron

Warn users if we're only keeping drafts for a certain period of time.

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 11 jaren geleden
bovenliggende
commit
01d4626c33

+ 1 - 0
Themes/default/PersonalMessage.template.php

@@ -1025,6 +1025,7 @@ function template_send()
 		echo '
 				<div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>',
 					sprintf($txt['draft_pm_saved'], $scripturl . '?action=pm;sa=showpmdrafts'), '
+					', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), '
 				</div>';
 
 	echo '

+ 1 - 0
Themes/default/Post.template.php

@@ -128,6 +128,7 @@ function template_main()
 		echo '
 				<div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>',
 					sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), '
+					', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), '
 				</div>';
 
 	// The post header... important stuff

+ 1 - 0
Themes/default/languages/Drafts.english.php

@@ -23,6 +23,7 @@ $txt['draft_retain'] = 'this will be retained for %s more days';
 $txt['draft_remove'] = 'Remove this draft';
 $txt['draft_saved'] = 'The contents have been saved as a draft, and will be accessible from the <a href="%1$s">Show Drafts area</a> of your profile.';
 $txt['draft_pm_saved'] = 'The contents have been saved as a draft, and will be accessible from the <a href="%1$s">Show Drafts area</a> of your message center.';
+$txt['draft_save_warning'] = 'Please note that all drafts will be automatically deleted after %1$d days.';
 
 // Admin options
 $txt['drafts_autosave_enabled'] = 'Enable automatic saving of drafts';