mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-07-05 18:56:20 -04:00
add enoperm js function
This commit is contained in:
@@ -808,7 +808,7 @@ function getENoPermHTML() {
|
||||
$result .= '<p>' .translate('ContactAdmin'). '</p>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '<div class="modal-footer">'.PHP_EOL;
|
||||
$result .= '<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>'.PHP_EOL;
|
||||
$result .= '<button type="button" id="enpCloseBtn" class="btn btn-secondary" data-dismiss="modal">Close</button>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
$result .= '</div>'.PHP_EOL;
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user