// 200personal
// Personal Information preferences

// default identity
// Set locked to true if you don't want the users to have multiple identities.
$_prefs['default_identity'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => true,
    'type' => 'enum',
    'enum' => (isset($identity) && is_object($identity)) ? $identity->getAll('id') : array(),
    'desc' => _("Your default identity:")
);

// identities array
// Don't change anything here.
$_prefs['identities'] = array(
    'value' => 'a:0:\{\}',
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// identity selection widget
$_prefs['identityselect'] = array(
    'shared' => true,
    'type' => 'special'
);

// delete button
$_prefs['deleteidentity'] = array(
    'type' => 'special',
    'shared' => true
);

// identity name
// If you lock this preference, you must specify a value or a hook for it in
// horde/config/hooks.php.
$_prefs['id'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' => _("Identity's name:")
);

// user full name for From: line
// If you lock this preference, you must specify a value or a hook for it in
// horde/config/hooks.php.
$_prefs['fullname'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' => _("Your full name:")
);

// user preferred email address for From: line
// If you lock this preference, you must specify a value or a hook for it in
// horde/config/hooks.php.
$_prefs['from_addr'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' =>  _("Your From: address:")
);

// user security question
$_prefs['security_question'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' => _("Enter a security question which you will be asked if you need to reset your password, e.g. 'what is the name of your pet?':")
);

// user security answer
$_prefs['security_answer'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' => _("Insert the required answer to the security question:")
);

// user alternate email
$_prefs['alternate_email'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' => _("Insert an email address to which you can receive the new password:")
);

// user language
$_prefs['language'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'escaped' => true,
    'desc' => _("Select your preferred language:")
);

// user time zone
$_prefs['timezone'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'desc' => _("Your current time zone:")
);

// time format
$_prefs['twentyFour'] = array(
    'value' => false,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => _("Display 24-hour times?")
);

// date format
$_prefs['date_format'] = array(
    'value' => '%x',
    'locked' => false,
    'shared' => true,
    'type' => 'enum',
    'enum' => array(
        '%x' => strftime('%x'),
        '%Y-%m-%d' => strftime('%Y-%m-%d'),
	'%d/%m/%Y' => strftime('%d/%m/%Y'),
        '%A %B %d, %Y' => strftime('%A %B %d, %Y'),
        '%A, %d. %B %Y' => strftime('%A, %d. %B %Y'),
        '%A, %d %B %Y' => strftime('%A, %d %B %Y'),
        '%a, %b %e, %Y' => strftime('%a, %b %e, %Y'),
        '%a, %b %e, %y' => strftime('%a, %b %e, %y'),
        '%a, %b %e' => strftime('%a, %b %e'),
        '%a, %e %b %Y' => strftime('%a, %e %b %Y'),
        '%a, %e %b %y' => strftime('%a, %e %b %y'),
        '%a %d %b %Y' => strftime ('%a %d %b %Y'),
        '%a %x' => strftime ('%a %x'),
        '%a %Y-%m-%d' => strftime ('%a %Y-%m-%d'),
        '%e %b %Y' => strftime('%e %b %Y'),
        '%e. %b %Y' => strftime('%e. %b %Y'),
        '%e. %m %Y' => strftime('%e %m %Y'),
        '%e. %m.' => strftime('%e. %m.'),
        '%e. %B' => strftime('%e. %B'),
        '%e. %B %Y' => strftime('%e. %B %Y'),
        '%e. %B %y' => strftime('%e. %B %y'),
        '%B %e, %Y' => strftime('%B %e, %Y'),
    ),
    'desc' => _("Choose how to display dates:"));

// UI theme
$_prefs['theme'] = array(
    'value' => 'bluewhite',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'desc' => _("Select your color scheme.")
);

// categories
$_prefs['categories'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// category colors
$_prefs['category_colors'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// UI for category management.
$_prefs['categorymanagement'] = array(
    'type' => 'special'
);

$_prefs['summary_refresh_time'] = array(
    'value' => 300,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(0 => _("Never"),
                    30 => _("Every 30 seconds"),
                    60 => _("Every minute"),
                    300 => _("Every 5 minutes"),
                    900 => _("Every 15 minutes"),
                    1800 => _("Every half hour")),
    'desc' => _("Refresh Portal View:")
);

$_prefs['show_sidebar'] = array(
    'value' => true,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => sprintf(_("Show the %s Menu on the left?"), $GLOBALS['registry']->get('name', 'horde'))
);

$_prefs['sidebar_width'] = array(
    'value' => 150,
    'locked' => false,
    'shared' => false,
    'type' => 'number',
    'desc' => sprintf(_("Width of the %s menu on the left (takes effect on next log-in):"), $GLOBALS['registry']->get('name', 'horde'))
);

$_prefs['moz_sidebar'] = array(
    'type' => 'link',
    'xurl' => sprintf('javascript:if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(\'%s\', \'%s\', \'%s\'); else alert(\'%s\');',
                      $GLOBALS['registry']->get('name', 'horde'),
                      Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/portal/sidebar.php', true, -1), 'mozbar', '1'),
                      Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/prefs.php', true, -1),
                      addslashes(_("Couldn't find the Mozilla Sidebar. Make sure the sidebar is open."))),
    'desc' => sprintf(_("Add the %s Menu as a Mozilla Sidebar"), $GLOBALS['registry']->get('name', 'horde'))
);

$_prefs['menu_view'] = array(
    'value' => 'both',
    'locked' => false,
    'shared' => true,
    'type' => 'enum',
    'enum' => array('text' => _("Text Only"),
                    'icon' => _("Icons Only"),
                    'both' => _("Icons with text")),
    'desc' => _("Menu mode:")
);

$_prefs['menu_refresh_time'] = array(
    'value' => 300,
    'locked' => false,
    'shared' => true,
    'type' => 'enum',
    'enum' => array(0 => _("Never"),
                    30 => _("Every 30 seconds"),
                    60 => _("Every minute"),
                    120 => _("Every 2 minutes"),
                    300 => _("Every 5 minutes")),
    'desc' => _("Refresh Dynamic Menu Elements:")
);

