mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Merge branch 'develop' into ticket-redaction
This commit is contained in:
@@ -27,7 +27,6 @@ $(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
|
||||
method: 'GET',
|
||||
data: { id: ajaxId },
|
||||
dataType: 'json',
|
||||
cache: false, // Prevent caching if necessary
|
||||
success: function (response) {
|
||||
if (response.error) {
|
||||
alert(response.error);
|
||||
@@ -42,7 +41,7 @@ $(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
|
||||
|
||||
// Build the modal HTML using the returned title and content.
|
||||
var modalHtml =
|
||||
'<div class="modal fade text-sm" id="' + modalId + '" tabindex="-1">' +
|
||||
'<div class="modal fade" id="' + modalId + '" tabindex="-1">' +
|
||||
' <div class="modal-dialog modal-'+ modalSize +'">' +
|
||||
' <div class="modal-content bg-dark">'
|
||||
+ response.content +
|
||||
@@ -51,7 +50,7 @@ $(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
|
||||
'</div>';
|
||||
|
||||
// Append the modal to the body and show it.
|
||||
$('body').append(modalHtml);
|
||||
$('.content-wrapper').append(modalHtml);
|
||||
var $modal = $('#' + modalId);
|
||||
$modal.modal('show');
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
function showOTPViaLoginID(login_id) {
|
||||
// Send a GET request to ajax.php as ajax.php?get_totp_token_via_id=true&login_id=ID
|
||||
function showOTPViaCredentialID(credential_id) {
|
||||
// Send a GET request to ajax.php as ajax.php?get_totp_token_via_id=true&credential_id=ID
|
||||
jQuery.get(
|
||||
"ajax.php", {
|
||||
get_totp_token_via_id: 'true',
|
||||
login_id: login_id
|
||||
credential_id: credential_id
|
||||
},
|
||||
function(data) {
|
||||
//If we get a response from post.php, parse it as JSON
|
||||
const token = JSON.parse(data);
|
||||
|
||||
document.getElementById("otp_" + login_id).innerText = token
|
||||
document.getElementById("otp_" + credential_id).innerText = token
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user