Aleksander Machniak
2016-01-05 f04b56f306ef101ff401fb45805b9ea28d28dfab
Enigma: Enable default signing/encryption on a signed/encrypted draft compose
2 files modified
9 ■■■■■ changed files
plugins/enigma/enigma.js 5 ●●●●● patch | view | raw | blame | history
plugins/enigma/lib/enigma_ui.php 4 ●●●● patch | view | raw | blame | history
plugins/enigma/enigma.js
@@ -48,6 +48,11 @@
            });
        }
        $.each(['encrypt', 'sign'], function() {
            if (rcmail.env['enigma_force_' + this])
                $('[name="_enigma_' + this + '"]').prop('checked', true);
        });
        if (rcmail.env.enigma_password_request) {
            rcmail.enigma_password_request(rcmail.env.enigma_password_request);
        }
plugins/enigma/lib/enigma_ui.php
@@ -999,6 +999,10 @@
            $this->rc->output->show_message($msg, 'error');
        }
        // Check sign/ecrypt options for signed/encrypted drafts
        $this->rc->output->set_env('enigma_force_encrypt', !empty($engine->decryptions));
        $this->rc->output->set_env('enigma_force_sign', !empty($engine->signatures));
        return $p;
    }
}