API QR token generator (#410)

* Added API QR token generator

* Pass only token

* Corrected link
This commit is contained in:
DL6ER
2017-02-27 22:33:35 +01:00
committed by GitHub
parent 276f2c1628
commit d104539708
4 changed files with 1587 additions and 0 deletions

View File

@@ -68,6 +68,23 @@ $(".confirm-flushlogs").confirm({
dialogClass: "modal-dialog modal-mg"
});
$(".api-token").confirm({
text: "Make sure that nobody else can scan this code around you. They will have full access to the API without having to know the password. Note that the generation of the QR code will take some time.",
title: "Confirmation required",
confirm(button) {
window.open("scripts/pi-hole/php/api_token.php");
},
cancel(button) {
// nothing to do
},
confirmButton: "Yes, show API token",
cancelButton: "No, go back",
post: true,
confirmButtonClass: "btn-danger",
cancelButtonClass: "btn-success",
dialogClass: "modal-dialog modal-mg"
});
$("#DHCPchk").click(function() {
$("input.DHCPgroup").prop("disabled", !this.checked);
$("#dhcpnotice").prop("hidden", !this.checked).addClass("lookatme");