summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-02-11 11:38:46 +0000
committerthomascube <thomas@roundcube.net>2012-02-11 11:38:46 +0000
commitba36dd03f6f7005a6e35ec02e4ff9a58f95be1c3 (patch)
tree002d0183144bb7adcf757144c035f0f8d0eba649 /program/steps/settings
parent5ea6e16036aa18c57c709dc88e4255120b63e965 (diff)
Backported r5850 to 0.7 branch
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/func.inc14
-rw-r--r--program/steps/settings/save_prefs.inc1
2 files changed, 15 insertions, 0 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index fdb65ade9..a529b3b12 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -660,6 +660,20 @@ function rcmail_user_prefs($current=null)
);
}
+ // show addressbook sort column
+ if (!isset($no_override['addressbook_sort_col'])) {
+ $field_id = 'rcmfd_addressbook_sort_col';
+ $select_sort = new html_select(array('name' => '_addressbook_sort_col', 'id' => $field_id));
+ $select_sort->add(rcube_label('name'), 'name');
+ $select_sort->add(rcube_label('firstname'), 'firstname');
+ $select_sort->add(rcube_label('surname'), 'surname');
+
+ $blocks['main']['options']['sort_col'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('listsorting'))),
+ 'content' => $select_sort->show($config['addressbook_sort_col']),
+ );
+ }
+
if (!isset($no_override['autocomplete_single'])) {
$field_id = 'rcmfd_autocomplete_single';
$checkbox = new html_checkbox(array('name' => '_autocomplete_single', 'id' => $field_id, 'value' => 1));
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index f5f3e36d3..0808c72bb 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -93,6 +93,7 @@ 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,
);