| | |
| | | $enabled = $this->rc->config->get('enigma_encryption', true); |
| | | |
| | | // message displaying |
| | | if ($this->rc->action == 'show' || $this->rc->action == 'preview') { |
| | | if ($this->rc->action == 'show' || $this->rc->action == 'preview' || $this->rc->action == 'print') { |
| | | $this->add_hook('message_load', array($this, 'message_load')); |
| | | $this->add_hook('template_object_messagebody', array($this, 'message_output')); |
| | | } |
| | |
| | | // $this->register_action('plugin.enigmacerts', array($this, 'preferences_ui')); |
| | | |
| | | $this->load_ui(); |
| | | $this->ui->add_css(); |
| | | |
| | | if (empty($_REQUEST['_framed']) || strpos($this->rc->action, 'plugin.enigma') === 0) { |
| | | $this->ui->add_css(); |
| | | } |
| | | } |
| | | |
| | | $this->add_hook('refresh', array($this, 'refresh')); |
| | |
| | | ); |
| | | } |
| | | |
| | | if (!isset($no_override['enigma_attach_pubkey'])) { |
| | | if (!$p['current']) { |
| | | $p['blocks']['main']['content'] = true; |
| | | return $p; |
| | | } |
| | | |
| | | $field_id = 'rcmfd_enigma_attach_pubkey'; |
| | | $input = new html_checkbox(array( |
| | | 'name' => '_enigma_attach_pubkey', |
| | | 'id' => $field_id, |
| | | 'value' => 1, |
| | | )); |
| | | |
| | | $p['blocks']['main']['options']['enigma_attach_pubkey'] = array( |
| | | 'title' => html::label($field_id, $this->gettext('attachpubkeydefault')), |
| | | 'content' => $input->show($this->rc->config->get('enigma_attach_pubkey') ? 1 : 0), |
| | | ); |
| | | } |
| | | |
| | | if (!isset($no_override['enigma_password_time'])) { |
| | | if (!$p['current']) { |
| | | $p['blocks']['main']['content'] = true; |
| | |
| | | 'enigma_encryption' => (bool) rcube_utils::get_input_value('_enigma_encryption', rcube_utils::INPUT_POST), |
| | | 'enigma_sign_all' => (bool) rcube_utils::get_input_value('_enigma_sign_all', rcube_utils::INPUT_POST), |
| | | 'enigma_encrypt_all' => (bool) rcube_utils::get_input_value('_enigma_encrypt_all', rcube_utils::INPUT_POST), |
| | | 'enigma_attach_pubkey' => (bool) rcube_utils::get_input_value('_enigma_attach_pubkey', rcube_utils::INPUT_POST), |
| | | 'enigma_password_time' => intval(rcube_utils::get_input_value('_enigma_password_time', rcube_utils::INPUT_POST)), |
| | | ); |
| | | } |