|
|
|
@ -25,9 +25,9 @@ if (!$OUTPUT->ajax_call)
|
|
|
|
|
function rcmail_user_prefs_form($attrib)
|
|
|
|
|
{
|
|
|
|
|
global $RCMAIL;
|
|
|
|
|
$config = $RCMAIL->config->all();
|
|
|
|
|
|
|
|
|
|
$no_override = is_array($config['dont_override']) ? array_flip($config['dont_override']) : array();
|
|
|
|
|
$no_override = array_flip($RCMAIL->config->get('dont_override', array()));
|
|
|
|
|
$blocks = $attrib['parts'] ? preg_split('/[\s,;]+/', strip_quotes($attrib['parts'])) : array('general','mailbox','compose','mailview','folders','server');
|
|
|
|
|
|
|
|
|
|
// add some labels to client
|
|
|
|
|
$RCMAIL->output->add_label('nopagesizewarning');
|
|
|
|
@ -36,6 +36,22 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
unset($attrib['form']);
|
|
|
|
|
|
|
|
|
|
$out = $form_start;
|
|
|
|
|
|
|
|
|
|
foreach ($blocks as $part)
|
|
|
|
|
$out .= rcmail_user_prefs_block($part, $no_override, $attrib);
|
|
|
|
|
|
|
|
|
|
return $out . $form_end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function rcmail_user_prefs_block($part, $no_override, $attrib)
|
|
|
|
|
{
|
|
|
|
|
global $RCMAIL;
|
|
|
|
|
$config = $RCMAIL->config->all();
|
|
|
|
|
|
|
|
|
|
switch ($part)
|
|
|
|
|
{
|
|
|
|
|
// General UI settings
|
|
|
|
|
case 'general':
|
|
|
|
|
$table = new html_table(array('cols' => 2));
|
|
|
|
|
|
|
|
|
|
// show language selection
|
|
|
|
@ -51,7 +67,6 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
$table->add(null, $select_lang->show($RCMAIL->user->language));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// show page size selection
|
|
|
|
|
if (!isset($no_override['timezone'])) {
|
|
|
|
|
$field_id = 'rcmfd_timezone';
|
|
|
|
@ -144,8 +159,13 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('uisettings'))) . $table->show($attrib));
|
|
|
|
|
if ($table->size())
|
|
|
|
|
$out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('uisettings'))) . $table->show($attrib));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Mailbox view (mail screen)
|
|
|
|
|
case 'mailbox':
|
|
|
|
|
$table = new html_table(array('cols' => 2));
|
|
|
|
|
|
|
|
|
|
if (!isset($no_override['focus_on_new_message'])) {
|
|
|
|
@ -196,8 +216,13 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
$table->add(null, $input_check_all->show($config['check_all_folders']?1:0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('mailboxview'))) . $table->show($attrib));
|
|
|
|
|
if ($table->size())
|
|
|
|
|
$out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('mailboxview'))) . $table->show($attrib));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Message viewing
|
|
|
|
|
case 'mailview':
|
|
|
|
|
$table = new html_table(array('cols' => 2));
|
|
|
|
|
|
|
|
|
|
// show checkbox for HTML/plaintext messages
|
|
|
|
@ -229,8 +254,13 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
$table->add(null, $input_inline_images->show($config['inline_images']?1:0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagesdisplaying'))) . $table->show($attrib));
|
|
|
|
|
if ($table->size())
|
|
|
|
|
$out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagesdisplaying'))) . $table->show($attrib));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Mail composition
|
|
|
|
|
case 'compose':
|
|
|
|
|
$table = new html_table(array('cols' => 2));
|
|
|
|
|
|
|
|
|
|
// Show checkbox for HTML Editor
|
|
|
|
@ -265,8 +295,13 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
$table->add(null, $select_param_folding->show($config['mime_param_folding']));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagescomposition'))) . $table->show($attrib));
|
|
|
|
|
if ($table->size())
|
|
|
|
|
$out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('messagescomposition'))) . $table->show($attrib));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Special IMAP folders
|
|
|
|
|
case 'folders':
|
|
|
|
|
// Configure special folders
|
|
|
|
|
if (!isset($no_override['default_imap_folders'])) {
|
|
|
|
|
$RCMAIL->imap_init(true);
|
|
|
|
@ -294,9 +329,13 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
$table->add(null, $select->show($config['trash_mbox'], array('name' => "_trash_mbox")));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('specialfolders'))) . $table->show($attrib));
|
|
|
|
|
$out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('specialfolders'))) . $table->show($attrib));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Server settings
|
|
|
|
|
case 'server':
|
|
|
|
|
$table = new html_table(array('cols' => 2));
|
|
|
|
|
|
|
|
|
|
if (!isset($no_override['read_when_deleted'])) {
|
|
|
|
@ -342,11 +381,17 @@ function rcmail_user_prefs_form($attrib)
|
|
|
|
|
$table->add(null, $input_expunge->show($config['logout_expunge']?1:0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('serversettings'))) . $table->show($attrib));
|
|
|
|
|
if ($table->size())
|
|
|
|
|
$out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('serversettings'))) . $table->show($attrib));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
return $out . $form_end;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
$out = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function rcmail_identities_list($attrib)
|
|
|
|
|