X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fjs%2Fcrypto_settings.js;h=29ee6c8d7b53051516620c3f8958a3e903a7152f;hp=9de86ea87be5e9955af5ae3d82536625302f72c3;hb=c4faef335b2362c81b8ebf026d4066c12d70536c;hpb=849bdf42ed7bd7cca68909d2b46869742dfd210e diff --git a/plugins/squirrelspell/js/crypto_settings.js b/plugins/squirrelspell/js/crypto_settings.js index 9de86ea8..29ee6c8d 100644 --- a/plugins/squirrelspell/js/crypto_settings.js +++ b/plugins/squirrelspell/js/crypto_settings.js @@ -1,17 +1,26 @@ /** - CRYPTO_SETTINGS.JS - ------------------- - Some client-side checks. Nothing fancy. - **/ + * crypto_settings.js + * + * Some client-side checks. Nothing fancy. + * + * @author Konstantin Riabitsev + * @copyright 2001-2020 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + */ +/** + * This function is the only thing. It is called on form submit and + * asks the user some questions. + */ function checkMe(){ - if (!document.forms[0].action.checked){ - alert ("Please make a selection first."); - return false; - } - if (document.forms[0].action.value=="encrypt") - cmsg="This will encrypt your personal dictionary and store it in an encrypted format. Proceed?"; - if (document.forms[0].action.value=="decrypt") - cmsg="This will decrypt your personal dictionary and store it in a clear-text format. Proceed?"; - return confirm(cmsg); + if (!document.forms[0].action.checked){ + alert (ui_makesel); + return false; + } + if (document.forms[0].encaction.value=="encrypt") + cmsg=ui_encrypt; + if (document.forms[0].encaction.value=="decrypt") + cmsg=ui_decrypt; + return confirm(cmsg); }