From 3044ae271e492412398ca4bd395329012dc14fe7 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 19 May 2008 04:09:38 -0400
Subject: [PATCH] -added flag_for_deletion in user prefs

---
 CHANGELOG                             |    2 +-
 program/localization/pl/labels.inc    |    7 +++++++
 program/steps/settings/func.inc       |   10 ++++++++++
 program/localization/en_US/labels.inc |    1 +
 program/steps/settings/save_prefs.inc |    1 +
 5 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 4b5307d..45ca598 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,7 +4,7 @@
 2008/05/16 (alec)
 ----------
 - In Preferences added possibility to configure 'read_when_deleted',
-  'mdn_requests' options
+  'mdn_requests', 'flag_for_deletion' options
 
 2008/05/15 (thomasb)
 ----------
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 94f1521..e917caa 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -260,6 +260,7 @@
 $labels['autosend'] = 'send automatically';
 $labels['ignore'] = 'ignore';
 $labels['readwhendeleted'] = 'Mark the message as read on delete';
+$labels['flagfordeletion'] = 'Flag the message for deletion instead of delete';
 
 $labels['autosavedraft']  = 'Automatically save draft';
 $labels['everynminutes']  = 'every $n minutes';
diff --git a/program/localization/pl/labels.inc b/program/localization/pl/labels.inc
index add85d7..ce9e790 100644
--- a/program/localization/pl/labels.inc
+++ b/program/localization/pl/labels.inc
@@ -220,5 +220,12 @@
 $labels['sortby'] = 'Sortuj wg';
 $labels['sortasc'] = 'Rosnąco';
 $labels['sortdesc'] = 'Malejąco';
+$labels['mailboxview'] = 'Widok poczty';
+$labels['mdnrequests'] = 'Powiadomienia nadawcy';
+$labels['askuser'] = 'spytaj użytkownika';
+$labels['autosend'] = 'wyślij automatycznie';
+$labels['ignore'] = 'ignoruj';
+$labels['readwhendeleted'] = 'Podczas usuwania oznacz wiadomość jako przeczytaną';
+$labels['flagfordeletion'] = 'Oznacz wiadomość do usunięcia zamiast ją usuwać';
 
 ?>
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index a3dd758..18ec36f 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -225,6 +225,16 @@
                     $input_readdeleted->show($config['read_when_deleted']?1:0));
     }
 
+  if (!isset($no_override['flag_for_deletion']))
+    {
+    $field_id = 'rcmfd_flag_for_deletion';
+    $input_flagfordeletion = new html_checkbox(array('name' => '_flag_for_deletion', 'id' => $field_id, 'value' => 1));
+    $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
+                    $field_id,
+                    Q(rcube_label('flagfordeletion')),
+                    $input_flagfordeletion->show($config['flag_for_deletion']?1:0));
+    }
+
   // Trash purging on logout
   if (!isset($no_override['logout_purge']))
     {
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index a373961..f8cf267 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -28,6 +28,7 @@
   'htmleditor'   => isset($_POST['_htmleditor']) ? TRUE : FALSE,
   'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE,
   'read_when_deleted' => isset($_POST['_read_when_deleted']) ? TRUE : FALSE,
+  'flag_for_deletion' => isset($_POST['_flag_for_deletion']) ? TRUE : FALSE,
   'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE,
   'logout_expunge' => isset($_POST['_logout_expunge']) ? TRUE : FALSE,
   'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0,

--
Gitblit v1.9.1