Commit b87c7aa7 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Show passphrase error on restore

parent 0230ee1f
......@@ -9,7 +9,8 @@ var errors = {
dir_not_chosen : 'Provide a local directory',
res_file_illegal: 'Invalid Entry. Provide a valid file name',
path_empty: 'Provide a path',
passphrase_empty: 'Provide a Passphrase'
passphrase_empty: 'Provide a Passphrase',
passphrase_wrong: 'Wrong Passphrase'
};
......
......@@ -172,6 +172,15 @@ function run_duplicity(restore, force) {
run_duplicity(true, true);
}
}
var gpg_error = new RegExp("GPGError: GPG Failed").exec(stderr);
if(gpg_error) {
$("#msg").html("");
$("#msg").removeClass("panel");
$('#res-passphrase-error small').text(errors.passphrase_wrong);
$('#res-passphrase-error small').show();
} else {
$('#res-passphrase-error small').hide();
}
}
} else {
$("#loader").hide();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment