summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/func.inc15
-rw-r--r--program/steps/settings/save_prefs.inc3
2 files changed, 17 insertions, 1 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index a529b3b12..25e42c16a 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -660,6 +660,21 @@ function rcmail_user_prefs($current=null)
);
}
+ // show addressbook listing mode selection
+ if (!isset($no_override['addressbook_name_listing'])) {
+ $field_id = 'rcmfd_addressbook_name_listing';
+ $select_listing = new html_select(array('name' => '_addressbook_name_listing', 'id' => $field_id));
+ $select_listing->add(rcube_label('name'), 0);
+ $select_listing->add(rcube_label('firstname') . ' ' . rcube_label('surname'), 1);
+ $select_listing->add(rcube_label('surname') . ' ' . rcube_label('firstname'), 2);
+ $select_listing->add(rcube_label('surname') . ', ' . rcube_label('firstname'), 3);
+
+ $blocks['main']['options']['list_name_listing'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('listnamedisplay'))),
+ 'content' => $select_listing->show($config['addressbook_name_listing']),
+ );
+ }
+
// show addressbook sort column
if (!isset($no_override['addressbook_sort_col'])) {
$field_id = 'rcmfd_addressbook_sort_col';
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 0808c72bb..971757cc5 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -93,8 +93,9 @@ switch ($CURR_SECTION)
case 'addressbook':
$a_user_prefs = array(
'default_addressbook' => get_input_value('_default_addressbook', RCUBE_INPUT_POST, true),
- 'addressbook_sort_col' => get_input_value('_addressbook_sort_col', RCUBE_INPUT_POST),
'autocomplete_single' => isset($_POST['_autocomplete_single']) ? TRUE : FALSE,
+ 'addressbook_sort_col' => get_input_value('_addressbook_sort_col', RCUBE_INPUT_POST),
+ 'addressbook_name_listing' => intval(get_input_value('_addressbook_name_listing', RCUBE_INPUT_POST)),
);
break;