diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index b120450fb..8f5703015 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -808,7 +808,7 @@ function getENoPermHTML() { $result .= '
' .translate('ContactAdmin'). '
'.PHP_EOL; $result .= ''.PHP_EOL; $result .= ''.PHP_EOL; $result .= ''.PHP_EOL; $result .= ''.PHP_EOL; diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index 669d56c70..bdeeb6a63 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -720,3 +720,25 @@ function reminderClickFunction() { }); }); } + +// Load then show the "You No Permission" error modal +function enoperm() { + $j.getJSON(thisUrl + '?request=modal&modal=enoperm') + .done(function(data) { + if ( $j('#ENoPerm').length ) { + $j('#ENoPerm').replaceWith(data.html); + } else { + $j("body").append(data.html); + } + $j('#ENoPerm').modal('show'); + + // Manage the CLOSE optionhelp modal button + document.getElementById("enpCloseBtn").addEventListener("click", function onENPCloseClick(evt) { + $j('#ENoPerm').modal('hide'); + }); + }) + .fail(function(jqxhr, textStatus, error) { + console.log("Request Failed: " + textStatus + ", " + error); + console.log("Response Text: " + jqxhr.responseText); + }); +}