Commit 96749b1b authored by Romain Therville's avatar Romain Therville 🐭

Update to tx_nG6_pi1.js

The ajax return codes (0,1,2 and 3) cannot be evaluated as strings.
"if (val == '1') {" becomes "if (val == 1) {" .

Warning : We could also leave this file as it is, and make sure the
value returned in AJAX is a String.

issue #170
parent 9ded8886
......@@ -1591,7 +1591,7 @@ function deletePRAHandler() {
url: val_url,
success: function(val, status, xhr) {
// return code : 0 = ok, 1 = right error, 2 = authentication error, 3 = connexion error
if (val == '0') {
if (val == 0) {
// Uncheck all checkboxes
$(':checked').each(function(i){
$(this).attr('checked',false);
......@@ -1600,11 +1600,11 @@ function deletePRAHandler() {
location.reload();
} else {
$("#modal-label-tmpl").html("Error");
if (val == '1') {
if (val== 1) {
$("#modal-body-tmpl").html("<div class='tx-nG6-pi1-error'>You don't have write permission on the specified directory.</div>");
} else if (val == '2') {
} else if (val == 2) {
$("#modal-body-tmpl").html("<div class='tx-nG6-pi1-error'>An error occurred during login. Most likely you didn't enter the username or password correctly. Be certain that you enter them precisely as they are, including upper/lower case.</div>");
} else if (val == '3') {
} else if (val == 3) {
$("#modal-body-tmpl").html("<div class='tx-nG6-pi1-error'>An error occurred during server connection. Please contact the site administrator.</div>");
}
$("#modal-foot-tmpl").html('<button class="btn btn-default" data-dismiss="modal" aria-hidden="true"><i class="glyphicon glyphicon-remove"></i> Close</button>');
......
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