Commit c1aa3820 authored by Celine Noirot's avatar Celine Noirot
Browse files

Merge branch 'issue#170' into 'dev'

Merge branch issue#170 with dev

See merge request !99
parents a0f61488 5a55ce55
...@@ -948,6 +948,7 @@ class tx_nG6_eid { ...@@ -948,6 +948,7 @@ class tx_nG6_eid {
$user_pwd = trim(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('user_pwd')); $user_pwd = trim(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('user_pwd'));
$res = tx_nG6_db::delete_purge_demand($purge_ids,$user_login, $user_pwd, $data_folder); $res = tx_nG6_db::delete_purge_demand($purge_ids,$user_login, $user_pwd, $data_folder);
//print $res;
print $res; print $res;
} elseif ($type == 'extend_retention_date_from_demand') { } elseif ($type == 'extend_retention_date_from_demand') {
//Extend the retention date for the //Extend the retention date for the
......
...@@ -899,13 +899,14 @@ $(function () { ...@@ -899,13 +899,14 @@ $(function () {
$.ajax({ $.ajax({
url: val_url, url: val_url,
success: function(val, status, xhr) { success: function(val, status, xhr) {
if (val == '1') { val = parseInt(val);
if (val == 1) {
// user has already access to this project // user has already access to this project
$("#error_message").html($("#username_val").val() + ' has already access to this project!').show(); $("#error_message").html($("#username_val").val() + ' has already access to this project!').show();
} else if (val == '4' || val == '3') { } else if (val == 4 || val == 3) {
// username exists in database cannot create // username exists in database cannot create
$("#error_message").html('Cannot create this user account, ' + $("#username_val").val() + ' already exists!').show(); $("#error_message").html('Cannot create this user account, ' + $("#username_val").val() + ' already exists!').show();
} else if (val == '5') { } else if (val == 5) {
// email exists in database cannot create // email exists in database cannot create
$("#error_message").html('Cannot create this user account, ' + $("#email_val").val() + ' already exists!').show(); $("#error_message").html('Cannot create this user account, ' + $("#email_val").val() + ' already exists!').show();
} else { } else {
...@@ -1591,7 +1592,8 @@ function deletePRAHandler() { ...@@ -1591,7 +1592,8 @@ function deletePRAHandler() {
url: val_url, url: val_url,
success: function(val, status, xhr) { success: function(val, status, xhr) {
// return code : 0 = ok, 1 = right error, 2 = authentication error, 3 = connexion error // return code : 0 = ok, 1 = right error, 2 = authentication error, 3 = connexion error
if (val == '0') { val = parseInt(val);
if (val == 0) {
// Uncheck all checkboxes // Uncheck all checkboxes
$(':checked').each(function(i){ $(':checked').each(function(i){
$(this).attr('checked',false); $(this).attr('checked',false);
...@@ -1600,11 +1602,11 @@ function deletePRAHandler() { ...@@ -1600,11 +1602,11 @@ function deletePRAHandler() {
location.reload(); location.reload();
} else { } else {
$("#modal-label-tmpl").html("Error"); $("#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>"); $("#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>"); $("#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-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>'); $("#modal-foot-tmpl").html('<button class="btn btn-default" data-dismiss="modal" aria-hidden="true"><i class="glyphicon glyphicon-remove"></i> Close</button>');
......
...@@ -663,8 +663,8 @@ $(function () { ...@@ -663,8 +663,8 @@ $(function () {
url: val_url, url: val_url,
success: function(val, status, xhr) { success: function(val, status, xhr) {
// return code : 0 = ok, 1 = right error, 2 = authentication error, 3 = connexion error, 4 = error delete file , 5 error sql update // return code : 0 = ok, 1 = right error, 2 = authentication error, 3 = connexion error, 4 = error delete file , 5 error sql update
val = parseInt(val);
if (val == "0") { if (val == 0) {
// Uncheck all checkboxes // Uncheck all checkboxes
$(".tx-nG6-wait").hide(); $(".tx-nG6-wait").hide();
$("#modal-body-tmpl").html('Done !'); $("#modal-body-tmpl").html('Done !');
...@@ -672,15 +672,15 @@ $(function () { ...@@ -672,15 +672,15 @@ $(function () {
refresh_purge_demand(purge_table["demand"]); refresh_purge_demand(purge_table["demand"]);
} else { } else {
$("#modal-label-tmpl").html("Error"); $("#modal-label-tmpl").html("Error");
if (val == "1") { if (val == 1) {
$("#modal-body-tmpl").html("<div class='tx-nG6-pi6-error'>You don't have write permission on the specified directory.</div>"); $("#modal-body-tmpl").html("<div class='tx-nG6-pi6-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-pi6-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>"); $("#modal-body-tmpl").html("<div class='tx-nG6-pi6-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-pi6-error'>An error occurred during server connection. Please contact the site administrator.</div>"); $("#modal-body-tmpl").html("<div class='tx-nG6-pi6-error'>An error occurred during server connection. Please contact the site administrator.</div>");
} else if (val == "4") { } else if (val == 4) {
$("#modal-body-tmpl").html("<div class='tx-nG6-pi6-error'>An error occurred during file deletion check if user have unix rigth to remove files. Please contact the site administrator.</div>"); $("#modal-body-tmpl").html("<div class='tx-nG6-pi6-error'>An error occurred during file deletion check if user have unix rigth to remove files. Please contact the site administrator.</div>");
} else if (val == "5") { } else if (val == 5) {
$("#modal-body-tmpl").html("<div class='tx-nG6-pi6-error'>An error occurred while updating in db. Please contact the site administrator.</div>"); $("#modal-body-tmpl").html("<div class='tx-nG6-pi6-error'>An error occurred while updating in db. 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>'); $("#modal-foot-tmpl").html('<button class="btn btn-default" data-dismiss="modal" aria-hidden="true"><i class="glyphicon glyphicon-remove"></i> Close</button>');
......
Supports Markdown
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