I for the life of me can't see what I'm doing wrong.
For now all I'm attempting to do is get an alert box. Once I get that working then I'll progress onto actually asking for a password. The problem is that I get nothing from this code...
PHP:
function init() {
$this->include_script('decrypt.js');
...
$this->add_hook('message_part_before', array($this, 'decryption_pw'));
...
}
function decryption_pw($args) {
$rcmail = rcmail::get_instance();
$rcmail->output->command('plugin.decrypt_password', array('test'=>"TEST"));
}
JavaScript:
if(window.rcmail) {
rcmail.addEventListener('init', function(evt) {
rcmail.addEventListener('plugin.decrypt_password', get_password);
});
}
function get_password(data) {
alert("I am a box!");
}
Any help would be appreciated...
YSM