Add support for custom password prompts

This commit is contained in:
Jermolene
2014-10-06 10:02:34 +01:00
parent 67db9d57a2
commit 0c8e538077
3 changed files with 54 additions and 2 deletions
+6 -2
View File
@@ -1244,10 +1244,14 @@ Decrypt any tiddlers stored within the element with the ID "encryptedArea". The
$tw.boot.decryptEncryptedTiddlers = function(callback) {
var encryptedArea = document.getElementById("encryptedStoreArea");
if(encryptedArea) {
var encryptedText = encryptedArea.innerHTML;
var encryptedText = encryptedArea.innerHTML,
prompt = "Enter a password to decrypt this TiddlyWiki";
// Prompt for the password
if($tw.utils.hop($tw.boot,"encryptionPrompts")) {
prompt = $tw.boot.encryptionPrompts.decrypt;
}
$tw.passwordPrompt.createPrompt({
serviceName: "Enter a password to decrypt this TiddlyWiki",
serviceName: prompt,
noUserName: true,
submitText: "Decrypt",
callback: function(data) {