1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Added noprompting for encryption

This commit is contained in:
Zack Scholl
2016-03-14 14:31:28 -04:00
parent 573f976ea3
commit a7589f1408
3 changed files with 21 additions and 33 deletions

View File

@@ -174,7 +174,7 @@
success: function (data) {
if (data['success'] == true) {
swal("Encryption", "Encrypted!", "success");
window.location.href = '/{{ .Title }}/view';
window.location.href = '/{{ .Title }}/view?noprompt=1';
} else {
swal("Encryption", "Something went wrong.", "error");
}

View File

@@ -74,9 +74,10 @@ a.deleteable {
$( document ).ready(function() {
{{ if .Encrypted }}
{{ if .Prompt }}
var pass1 = "";
swal({
title: "Encryption",
title: "Decryption",
text: "Enter your passphrase:",
type: "input",
showCancelButton: true,
@@ -109,11 +110,12 @@ $( document ).ready(function() {
}
});
});
{{ end }}
$('.postdecrypt').click(function(event) {
var pass1 = "";
event.preventDefault();
swal({
title: "Encryption",
title: "Decryption",
text: "Enter your passphrase:",
type: "input",
showCancelButton: true,