#9254 load password with ajax

This commit is contained in:
Daniel Maya 2022-09-23 13:24:46 +02:00
parent d14bcfe616
commit 795308367f
2 changed files with 22 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<?php
$token_name = get_parameter('token_name', 0);
$no_boolean = (bool) get_parameter('no_boolean', 0);
$value_token = db_get_value(
'value',
@ -9,4 +10,8 @@ $value_token = db_get_value(
$token_name
);
echo (bool) $value_token;
if ($no_boolean === true) {
echo json_encode(io_safe_output($value_token));
} else {
echo (bool) $value_token;
}

View File

@ -2176,3 +2176,19 @@ $.fn.filterByText = function(textbox) {
});
});
};
function loadPasswordConfig(id, value) {
$.ajax({
url: "ajax.php",
data: {
page: "include/ajax/config.ajax",
token_name: `${value}`,
no_boolean: 1
},
type: "GET",
dataType: "json",
success: function(data) {
$(`#${id}`).val(data);
}
});
}