Added fbModal button

This commit is contained in:
Joey Lai
2017-02-03 11:47:16 +01:00
parent ba6f86e70e
commit 05d6bf8aa6
3 changed files with 11 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ var facebookModal = document.getElementById("fbModal");
// Get the button that opens the modal
var registerBtn = document.getElementById("registerBtn");
var btn = document.getElementById("myBtn");
var fbBtn = document.getElementById("fbBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
@@ -24,6 +24,9 @@ btn.onclick = function () {
registerBtn.onclick = function () {
registerModal.style.display = "block";
}
fbBtn.onclick = function () {
facebookModal.style.display = "block";
}
/**
* WHen the user clicks on (X), close the modal

View File

@@ -1,3 +1,9 @@
<?php
if(isset($acces_token)) {
echo '<button id="fbBtn" class="button">Facebook registreer</button>';
}
?>
<!-- The Modal -->
<div id="fbModal" class="modal">
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"

View File

@@ -69,7 +69,7 @@ $fb = new Facebook\Facebook([
]);
// Redirect back to login.php after logging/canceling with facebook.
$redirect = "https://myhyvesbookplus.nl/login.php";
$redirect = "https://myhyvesbookplus.nl/~joey/login.php";
$helper = $fb->getRedirectLoginHelper();
try {