1: <?php
2: /**
3: * Copyright 2012-2014 Horde LLC (http://www.horde.org/)
4: *
5: * See the enclosed file COPYING for license information (GPL). If you
6: * did not receive this file, see http://www.horde.org/licenses/gpl.
7: *
8: * @category Horde
9: * @copyright 2012-2014 Horde LLC
10: * @license http://www.horde.org/licenses/gpl GPL
11: * @package IMP
12: */
13:
14: /**
15: * Special prefs handling for the 'encryptselect' preference.
16: *
17: * @author Michael Slusarz <slusarz@horde.org>
18: * @category Horde
19: * @copyright 2012-2014 Horde LLC
20: * @license http://www.horde.org/licenses/gpl GPL
21: * @package IMP
22: */
23: class IMP_Prefs_Special_Encrypt implements Horde_Core_Prefs_Ui_Special
24: {
25: /**
26: */
27: public function init(Horde_Core_Prefs_Ui $ui)
28: {
29: }
30:
31: /**
32: */
33: public function display(Horde_Core_Prefs_Ui $ui)
34: {
35: $view = new Horde_View(array(
36: 'templatePath' => IMP_TEMPLATES . '/prefs'
37: ));
38: $view->addHelper('Horde_Core_View_Helper_Label');
39:
40: $view->elist = $GLOBALS['injector']->getInstance('IMP_Compose_Ui')->encryptList();
41:
42: return $view->render('encrypt');
43: }
44:
45: /**
46: */
47: public function update(Horde_Core_Prefs_Ui $ui)
48: {
49: return $GLOBALS['prefs']->setValue('default_encrypt', $ui->vars->default_encrypt);
50: }
51:
52: }
53: