summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/settings/func.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-27 11:22:56 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-27 11:22:56 +0000
commitf665aaaffa4023cfc13980833634684c0524f427 (patch)
tree969b8fd2b2c79d23ef7d69b639e64442a7ea0278 /roundcubemail/program/steps/settings/func.inc
parent46e72cb2f9b755139e3c0bb4cc34897ef1e754a3 (diff)
- Added option to specify to which address book add new contacts
git-svn-id: https://svn.roundcube.net/trunk@4811 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/settings/func.inc')
-rw-r--r--roundcubemail/program/steps/settings/func.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/settings/func.inc b/roundcubemail/program/steps/settings/func.inc
index a44d6c8ff..280185e76 100644
--- a/roundcubemail/program/steps/settings/func.inc
+++ b/roundcubemail/program/steps/settings/func.inc
@@ -131,6 +131,7 @@ function rcmail_user_prefs($current=null)
$sections['mailbox'] = array('id' => 'mailbox', 'section' => rcube_label('mailboxview'));
$sections['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition'));
$sections['mailview'] = array('id' => 'mailview','section' => rcube_label('messagesdisplaying'));
+ $sections['addressbook'] = array('id' => 'addressbook','section' => rcube_label('addressbook'));
$sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders'));
$sections['server'] = array('id' => 'server', 'section' => rcube_label('serversettings'));
@@ -582,6 +583,32 @@ function rcmail_user_prefs($current=null)
break;
+
+ // Addressbook config
+ case 'addressbook':
+
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ );
+
+ if (!isset($no_override['default_addressbook'])
+ && ($books = $RCMAIL->get_address_sources(true))
+ ) {
+ $field_id = 'rcmfd_default_addressbook';
+ $select_abook = new html_select(array('name' => '_default_addressbook', 'id' => $field_id));
+
+ foreach ($books as $book) {
+ $select_abook->add($book['name'], $book['id']);
+ }
+
+ $blocks['main']['options']['default_addressbook'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('defaultaddressbook'))),
+ 'content' => $select_abook->show($config['default_addressbook']),
+ );
+ }
+
+ break;
+
// Special IMAP folders
case 'folders':