diff options
| -rw-r--r-- | inbox_settings.php | 16 | ||||
| -rw-r--r-- | localization/en_US.inc | 1 | ||||
| -rw-r--r-- | skins/elastic/templates/key_import.html | 3 |
3 files changed, 16 insertions, 4 deletions
diff --git a/inbox_settings.php b/inbox_settings.php index c70b38b..24a3326 100644 --- a/inbox_settings.php +++ b/inbox_settings.php @@ -192,10 +192,22 @@ class inbox_settings extends rcube_plugin { return '<p>Not yet implemented.</p>'; } + private function import_keys() { + if (!isset($_POST['import'])) + return false; + + return true; + } + function render_import_ui() { $this->rcmail->output->set_pagetitle($this->gettext('key_import')); - // TODO: save results - $this->rcmail->output->send('inbox_settings.key_import'); + if ($this->import_keys()) { + $this->rcmail->output->command( + 'display_message', $this->gettext('keys_imported'), 'notice'); + $this->rcmail->output->redirect('plugin.inbox_keys'); + } else { + $this->rcmail->output->send('inbox_settings.key_import'); + } } function delete_selected_keys() { diff --git a/localization/en_US.inc b/localization/en_US.inc index 08e0df3..b70397f 100644 --- a/localization/en_US.inc +++ b/localization/en_US.inc @@ -18,6 +18,7 @@ $labels['fingerprint'] = 'Key Fingerprint'; $labels['comment'] = 'Comment'; $labels['comment_placeholder'] = 'A comment to remember this key by'; $labels['paste_key_data'] = 'Paste ASCII-armored PGP public key(s) here. Please do not upload private keys.'; +$labels['keys_imported'] = 'Encryption key(s) added'; $labels['confirm_delete_key'] = 'Are you sure you want to remove this encryption key from your account?'; $labels['deleting_key'] = 'Removing encryption key...'; $labels['keys_deleted'] = 'Encryption key(s) removed' diff --git a/skins/elastic/templates/key_import.html b/skins/elastic/templates/key_import.html index f48e21a..292f24f 100644 --- a/skins/elastic/templates/key_import.html +++ b/skins/elastic/templates/key_import.html @@ -4,7 +4,6 @@ <h1 class="voice"><roundcube:label name="settings" /> : <roundcube:label name="inbox_settings.key_import" /></h1> -<!-- keys list --> <div id="layout-content" role="main"> <h2 id="aria-label-toolbar" class="voice"><roundcube:label name="arialabeltoolbar" /></h2> <div class="header"> @@ -13,7 +12,7 @@ </div> <div class="formcontainer"> <h1 class="voice"><roundcube:label name="inbox_settings.key_import" /></h1> - <roundcube:form name="importform" method="post" id="import-key" class="formcontent"> + <roundcube:form name="importform" action="" method="post" id="import-key" class="formcontent"> <fieldset> <legend><roundcube:label name="inbox_settings.key_import" /></legend> <table class="propform"> |
