summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-07-31 21:08:17 +0000
committerthomascube <thomas@roundcube.net>2008-07-31 21:08:17 +0000
commitfaf8766fd2a34ad1eaf1545bab659ab459c074ad (patch)
tree0e71a6139e814749f41331ba87450fe1b5ebfb66
parent62e54249df84f7d8a1d9af2f6d5a978bbba78bb5 (diff)
Save outgoing mail to selectable folder (#1324581)
-rw-r--r--CHANGELOG5
-rw-r--r--program/localization/de_CH/labels.inc3
-rw-r--r--program/localization/de_DE/labels.inc3
-rw-r--r--program/localization/en_US/labels.inc3
-rw-r--r--program/steps/mail/compose.inc9
-rw-r--r--program/steps/mail/sendmail.inc14
-rw-r--r--skins/default/templates/compose.html7
7 files changed, 35 insertions, 9 deletions
diff --git a/CHANGELOG b/CHANGELOG
index f7585c250..c898ac958 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,11 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/07/31 (thomasb)
+----------
+- Make default imap folders configurable for each user (#1485075)
+- Save outgoing mail to selectable folder (#1324581)
+
2008/07/21 (alec)
----------
- use long date format in print mode (#1485191)
diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc
index 3851a9f93..fdeb1367b 100644
--- a/program/localization/de_CH/labels.inc
+++ b/program/localization/de_CH/labels.inc
@@ -188,6 +188,8 @@ $labels['alwaysshow'] = 'Bilder von $sender immer zeigen';
$labels['htmltoggle'] = 'HTML';
$labels['plaintoggle'] = 'Klartext';
+$labels['savesentmessagein'] = 'Nachricht speichern in';
+$labels['dontsave'] = 'nicht speichern';
$labels['addcc'] = 'Cc hinzufügen';
$labels['addbcc'] = 'Bcc hinzufügen';
@@ -280,6 +282,7 @@ $labels['rename'] = 'Umbenennen';
$labels['renamefolder'] = 'Ordner umbenennen';
$labels['deletefolder'] = 'Ordner löschen';
$labels['managefolders'] = 'Ordner verwalten';
+$labels['specialfolders'] = 'Spezialordner';
$labels['sortby'] = 'Sortieren nach';
$labels['sortasc'] = 'aufsteigend sortieren';
diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc
index ab56a9f8a..fbc2a44b0 100644
--- a/program/localization/de_DE/labels.inc
+++ b/program/localization/de_DE/labels.inc
@@ -149,6 +149,8 @@ $labels['showimages'] = 'Bilder anzeigen';
$labels['alwaysshow'] = 'Bilder von $sender immer zeigen';
$labels['htmltoggle'] = 'HTML';
$labels['plaintoggle'] = 'Nur-Text';
+$labels['savesentmessagein'] = 'Nachricht speichern in';
+$labels['dontsave'] = 'nicht speichern';
$labels['addcc'] = 'Cc hinzufügen';
$labels['addbcc'] = 'Bcc hinzufügen';
$labels['addreplyto'] = 'Antwortadresse hinzufügen';
@@ -221,6 +223,7 @@ $labels['rename'] = 'Umbenennen';
$labels['renamefolder'] = 'Ordner umbenennen';
$labels['deletefolder'] = 'Ordner löschen';
$labels['managefolders'] = 'Ordner verwalten';
+$labels['specialfolders'] = 'Spezialordner';
$labels['sortby'] = 'Sortieren nach';
$labels['sortasc'] = 'Aufsteigend sortieren';
$labels['sortdesc'] = 'Absteigend sortieren';
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 4fb3df977..43d91f94b 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -190,6 +190,8 @@ $labels['alwaysshow'] = 'Always show images from $sender';
$labels['htmltoggle'] = 'HTML';
$labels['plaintoggle'] = 'Plain text';
+$labels['savesentmessagein'] = 'Save sent message in';
+$labels['dontsave'] = 'don\'t save';
$labels['addcc'] = 'Add Cc';
$labels['addbcc'] = 'Add Bcc';
@@ -284,6 +286,7 @@ $labels['rename'] = 'Rename';
$labels['renamefolder'] = 'Rename folder';
$labels['deletefolder'] = 'Delete folder';
$labels['managefolders'] = 'Manage folders';
+$labels['specialfolders'] = 'Special folders';
$labels['sortby'] = 'Sort by';
$labels['sortasc'] = 'Sort ascending';
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 9da449d54..8e5a7c2ef 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -776,6 +776,14 @@ function rcmail_editor_selector($attrib)
}
+function rcmail_store_target_selection($attrib)
+{
+ $attrib['name'] = '_store_target';
+ $select = rcmail_mailbox_select(array('noselection' => '- '.rcube_label('dontsave').' -'));
+ return $select->show(rcmail::get_instance()->config->get('sent_mbox'), $attrib);
+}
+
+
function get_form_tags($attrib)
{
global $RCMAIL, $MESSAGE_FORM;
@@ -813,6 +821,7 @@ $OUTPUT->add_handlers(array(
'priorityselector' => 'rcmail_priority_selector',
'editorselector' => 'rcmail_editor_selector',
'receiptcheckbox' => 'rcmail_receipt_checkbox',
+ 'storetarget' => 'rcmail_store_target_selection',
));
/****** get contacts for this user and add them to client scripts ********/
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 75000d4aa..090919e35 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -355,27 +355,27 @@ if (!$savedraft)
// Determine which folder to save message
if ($savedraft)
- $store_target = 'drafts_mbox';
+ $store_target = $CONFIG['drafts_mbox'];
else
- $store_target = 'sent_mbox';
+ $store_target = isset($_POST['_store_target']) ? get_input_value('_store_target', RCUBE_INPUT_POST) : $CONFIG['sent_mbox'];
-if ($CONFIG[$store_target])
+if ($store_target)
{
// check if mailbox exists
- if (!in_array_nocase($CONFIG[$store_target], $IMAP->list_mailboxes()))
- $store_folder = $IMAP->create_mailbox($CONFIG[$store_target], TRUE);
+ if (!in_array_nocase($store_target, $IMAP->list_mailboxes()))
+ $store_folder = $IMAP->create_mailbox($store_target, TRUE);
else
$store_folder = TRUE;
// append message to sent box
if ($store_folder)
- $saved = $IMAP->save_message($CONFIG[$store_target], $MAIL_MIME->getMessage());
+ $saved = $IMAP->save_message($store_target, $MAIL_MIME->getMessage());
// raise error if saving failed
if (!$saved)
{
raise_error(array('code' => 800, 'type' => 'imap', 'file' => __FILE__,
- 'message' => "Could not save message in $CONFIG[$store_target]"), TRUE, FALSE);
+ 'message' => "Could not save message in $store_target"), TRUE, FALSE);
$OUTPUT->show_message('errorsaving', 'error');
$OUTPUT->send('iframe');
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index a666bed90..ac71d9b30 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -132,11 +132,14 @@ function rcmail_prev_sibling(elm)
<table border="0" cellspacing="0" width="100%" summary=""><tbody>
<tr>
-<td>
+<td style="white-space:nowrap">
<roundcube:button type="input" command="send" class="button" label="sendmessage" tabindex="8" />
<roundcube:button type="input" command="list" class="button" label="cancel" tabindex="9" />
</td>
-<td align="right">
+<td style="text-align:center">
+ <label><span style="white-space:nowrap"><roundcube:label name="savesentmessagein" />:</span> <roundcube:object name="storetarget" /></label>
+</td>
+<td style="text-align:right; white-space:nowrap">
<roundcube:label name="editortype" />:&nbsp;
<span class="radios-left"><roundcube:object name="editorSelector" tabindex="10" /></span>
</td>