Getting ready for 1.4.0 RC1
[squirrelmail.git] / plugins / squirrelspell / js / crypto_settings.js
index 9de86ea87be5e9955af5ae3d82536625302f72c3..604a7cf29a8f8b0f805ed0eeb1de6333d6e676b5 100644 (file)
@@ -1,17 +1,26 @@
 /**
-   CRYPTO_SETTINGS.JS
-   -------------------
-   Some client-side checks. Nothing fancy.
-                                                               **/
+ * crypto_settings.js
+ * -------------------
+ * Some client-side checks. Nothing fancy.
+ *
+ * $Id$
+ *
+ * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
+ * @version $Date$
+ */
 
+/**
+ * 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].action.value=="encrypt")
+    cmsg=ui_encrypt;
 if (document.forms[0].action.value=="decrypt")
+    cmsg=ui_decrypt;
 return confirm(cmsg);
 }