mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Added noprompting for encryption
Former-commit-id: 3c1e99d8a999aab6b054bd0b8bbf7a43369ef971 [formerly ee8f5a6e2f793ed9e381ededcf1154da00022ad8] [formerly 55a0d258aa83ce2683aedfc9da60d0568d864945 [formerly aec11a9a4e4053e144094270914f7f28a18fa9bf [formerlya7589f1408]]] Former-commit-id: e724a3bb346d7e3ebc487788b84ad276a3da21cf [formerly 250b7ea3ff87f0db61f3e4a4b8c54925c7d86285] Former-commit-id: 5b2412d02eb7e2c1bb2d82d502a0eac2de4cc792 Former-commit-id:4db31614ae
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