* See Horde_Registry_Application:: for a summary of the API callbacks that
* are available.
*
+ * Session variables set (stored in 'horde_prefs'):
+ * 'advanced' - (boolean) If true, display advanced prefs.
+ * 'nomenu' - (boolean) If true, hide menu display.
+ *
* Copyright 2001-2010 The Horde Project (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (LGPL). If you
if (!empty($this->prefGroups[$group]['members'])) {
foreach ($this->prefGroups[$group]['members'] as $pref) {
+ /* Changeable pref if:
+ * 1. Not locked
+ * 2. Not in suppressed array ($this->suppress)
+ * 3. Not an advanced pref -or- in advanced view mode
+ * 4. Not checking for implicit -or- not an implicit pref */
if (!$GLOBALS['prefs']->isLocked($pref) &&
!in_array($pref, $this->suppress) &&
+ (empty($this->prefs[$pref]['advanced']) ||
+ !empty($_SESSION['horde_prefs']['advanced'])) &&
(!$implicit ||
(!empty($this->prefs[$pref]['type']) &&
($this->prefs[$pref]['type'] != 'implicit')))) {
*/
public function handleForm()
{
+ /* Toggle Advanced/Basic mode. */
+ if (!empty($this->vars->show_advanced) ||
+ !empty($this->vars->show_basic)) {
+ $_SESSION['horde_prefs']['advanced'] = !empty($this->vars->show_advanced);
+ }
+
if (!$this->group || !$this->groupIsEditable($this->group)) {
return;
}
}
$t->set('apps', $tmp);
$t->set('header', htmlspecialchars(($this->app == 'horde') ? _("Global Options") : sprintf(_("Options for %s"), $registry->get('name', $this->app))));
+
+ if (empty($_SESSION['horde_prefs']['advanced'])) {
+ $t->set('advanced', $this->selfUrl()->add('show_advanced', 1));
+ } else {
+ $t->set('basic', $this->selfUrl()->add('show_basic', 1));
+ }
+
echo $t->fetch($h_templates . '/prefs/app.html');
/* Generate navigation header. */
// allow the user to add a priority header when composing messages?
$_prefs['set_priority'] = array(
'value' => 1,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Set a priority header when composing messages?")
);
// Should the original message be included?
$_prefs['reply_quote'] = array(
'value' => 1,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Include original message in a reply?")
);
// forward method.
$_prefs['forward_default'] = array(
'value' => 'attach',
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'enum',
'enum' => array(
'attach' => _("As attachment"),
// original message (for the body text)?
$_prefs['forward_format'] = array(
'value' => 0,
- // Locked by default
+ 'advanced' => true,
'locked' => true,
'type' => 'checkbox',
'desc' => _("When forwarding a message in the body text, should we use the same format as the original message?")
// auto-save drafts? value is in minutes, 0 == don't save.
$_prefs['auto_save_drafts'] = array(
'value' => 5,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'enum',
'enum' => array(
0 => _("No"),
// should we try to mark different conversations with different colors?
$_prefs['highlight_text'] = array(
'value' => 1,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Mark different levels of quoting with different colors?")
);
// should we try to mark simple markup with html tags?
$_prefs['highlight_simple_markup'] = array(
'value' => 1,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Mark simple markup?")
);
// should we dim signatures?
$_prefs['dim_signature'] = array(
'value' => 0,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Dim signatures?")
);
// Send read receipts?
$_prefs['disposition_send_mdn'] = array(
'value' => 1,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'enum',
'enum' => array(
0 => _("Never send read receipt"),
// message was first received on the IMAP server and is maintained even
// if the message moves between mailboxes.
'value' => Horde_Imap_Client::SORT_ARRIVAL,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'enum',
'enum' => array(
Horde_Imap_Client::SORT_ARRIVAL => _("Arrival time on server"),
$_prefs['mimp_download_confirm'] = array(
'value' => 0,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'number',
'desc' => _("Only show download confirmation page if message part is greater than this size, in bytes. Set to 0 to always require the confirmation page.")
);
$_prefs['mimp_inline_all'] = array(
'value' => 0,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Show all inline parts by default in message view? If unchecked, will treat all but the first viewable inline part as attachments.")
);
$_prefs['preview_maxlen'] = array(
'value' => 250,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'enum',
'enum' => array(
100 => _("100 characters"),
500 => _("500 characters"),
1000 => _("1000 characters")
),
- 'desc' => _("Characters to display:")
+ 'desc' => _("Characters to display in preview:")
);
$_prefs['preview_strip_nl'] = array(
'value' => 1,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
- 'desc' => _("Strip linebreaks?")
+ 'desc' => _("Strip linebreaks in preview?")
);
$_prefs['preview_show_unread'] = array(
'value' => 1,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Show previews for unread messages only?")
);
$_prefs['preview_show_tooltip'] = array(
'value' => 0,
- // Locked by default
- 'locked' => true,
+ 'advanced' => true,
'type' => 'checkbox',
'desc' => _("Show previews in tooltips?")
);