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:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user