/** */ public function display(Horde_Core_Prefs_Ui $ui) { Horde_Core_Prefs_Ui_Widgets::addressbooksInit(); $search = Kronolith::getAddressbookSearchParams(); return Horde_Core_Prefs_Ui_Widgets::addressbooks(array('fields' => $search['fields'], 'sources' => $search['sources'])); }
/** */ public function init(Horde_Core_Prefs_Ui $ui) { Horde_Core_Prefs_Ui_Widgets::addressbooksInit(); }
}); $_prefs['purge_sentmail_interval'] = array('value' => 0, 'type' => 'enum', 'enum' => array_merge(array(0 => _("Never")), Horde_LoginTasks::getLabels()), 'desc' => _("Purge sent mail how often:"), 'help' => 'prefs-purge_sentmail_interval', 'suppress' => function () { return !$GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS); }); $_prefs['purge_sentmail_keep'] = array('value' => 30, 'type' => 'number', 'desc' => _("Purge messages in sent mail mailbox(es) older than this amount of days."), 'help' => 'prefs-purge_sentmail_keep', 'requires' => array('purge_sentmail_interval'), 'suppress' => function () { return !$GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_FOLDERS); }); // *** Addressbook Preferences *** $prefGroups['addressbooks'] = array('column' => _("Compose"), 'label' => _("Address Books"), 'desc' => _("Select address book sources for adding/searching."), 'members' => array('save_recipients', 'sourceselect', 'add_source'), 'suppress' => function () { $contacts_app = $GLOBALS['registry']->hasInterface('contacts'); return !$contacts_app || !$GLOBALS['registry']->hasPermission($contacts_app); }); $_prefs['save_recipients'] = array('value' => 0, 'type' => 'checkbox', 'desc' => _("Save recipients automatically to the default address book?")); // address book selection widget $_prefs['sourceselect'] = array('type' => 'special', 'handler' => 'IMP_Prefs_Special_Sourceselect', 'requires_nolock' => array('search_sources'), 'on_init' => function ($ui) { Horde_Core_Prefs_Ui_Widgets::addressbooksInit(); }); // Address book(s) to use when expanding addresses // Refer to Turba's config/backends.php for possible source values // // You can provide default values this way: // 'value' => json_encode(array('source_one', 'source_two')) $_prefs['search_sources'] = array('value' => '', 'on_change' => function () { $GLOBALS['injector']->getInstance('IMP_Contacts')->clearCache(); }); // Field(s) to use when expanding addresses // Refer to Turba's config/backends.php for possible source and field values // // If you want to provide a default value, this field depends on the // search_sources preference. For example: // 'value' => json_encode(array(