Cookie notice na simple frontendu (aai)
This commit is contained in:
parent
d0070658f9
commit
97f129ff65
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
include_once '../../admin/survey/definition.php';
|
||||
include_once('../../admin/survey/definition.php');
|
||||
include_once('../../function.php');
|
||||
include_once('../../vendor/autoload.php');
|
||||
include_once('classes/DisplayController.php');
|
||||
|
||||
|
||||
// Poslana zahteva za izbris
|
||||
@ -15,5 +16,11 @@
|
||||
|
||||
GDPR::displayGDPRRequestForm($status);
|
||||
}
|
||||
// Potrditev piskotka
|
||||
elseif($_GET['a'] == 'cookie_confirm'){
|
||||
|
||||
$dc = new DisplayController();
|
||||
$dc->cookieConfirm();
|
||||
}
|
||||
|
||||
?>
|
@ -964,4 +964,40 @@ class DisplayController{
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
// Cookie notice
|
||||
public function displayCookieNotice(){
|
||||
global $lang;
|
||||
global $aai_instalacija;
|
||||
global $cookie_domain;
|
||||
|
||||
/*if(!$aai_instalacija){
|
||||
return;
|
||||
}*/
|
||||
|
||||
if(isset($_COOKIE['simple_frontend_cookie'])){
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div class="cookie_notice">';
|
||||
|
||||
echo ' <div class="left">';
|
||||
echo ' <p class="bold">'.$lang['simple_cookie_1'].'</p>';
|
||||
echo ' <p>'.$lang['simple_cookie_2'].'</p>';
|
||||
echo ' </div>';
|
||||
|
||||
echo ' <div class="right">';
|
||||
echo ' <button onClick="cookie_confirm();">'.$lang['simple_cookie_button'].'</button>';
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Confirm cookie
|
||||
public function cookieConfirm(){
|
||||
|
||||
// Set cookie for 90 days
|
||||
setcookie("simple_frontend_cookie", "1", time() + (60*60*24*90), "/");
|
||||
}
|
||||
}
|
@ -57,6 +57,13 @@ a:hover {
|
||||
color: #4ca0ea;
|
||||
}
|
||||
|
||||
.aai a {
|
||||
color: #e35205;
|
||||
}
|
||||
.aai a:hover {
|
||||
color: #fa6c21;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
@ -223,6 +230,50 @@ footer .footer_content .col .logo_holder img {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.aai footer a:hover {
|
||||
color: #e35205 !important;
|
||||
}
|
||||
|
||||
.cookie_notice {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 20px;
|
||||
background-color: white;
|
||||
border-top: 1px #666 solid;
|
||||
box-shadow: 0px 0px 5px 1px #999;
|
||||
}
|
||||
.cookie_notice .left {
|
||||
margin-right: 50px;
|
||||
text-align: left;
|
||||
}
|
||||
.cookie_notice .left p {
|
||||
margin: 5px 0;
|
||||
line-height: 22px;
|
||||
}
|
||||
.cookie_notice .right button {
|
||||
padding: 13px;
|
||||
font-weight: 600;
|
||||
text-transform: none;
|
||||
background-color: #1e88e5;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.cookie_notice .right button:hover {
|
||||
background-color: #4ca0ea;
|
||||
}
|
||||
|
||||
.aai .cookie_notice button {
|
||||
background-color: #e35205;
|
||||
}
|
||||
.aai .cookie_notice button:hover {
|
||||
background-color: #fa6c21;
|
||||
}
|
||||
|
||||
body.landing_page #main,
|
||||
body.register #main,
|
||||
body.login #main,
|
||||
@ -907,6 +958,14 @@ body.login_noEmail #content.aai #main .main_content .app_subtitle {
|
||||
footer .footer_content .logo_holder img {
|
||||
margin: 20px auto 30px auto;
|
||||
}
|
||||
|
||||
.cookie_notice {
|
||||
flex-direction: column;
|
||||
}
|
||||
.cookie_notice .left {
|
||||
margin: 0 0 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style.css.map */
|
||||
|
@ -64,6 +64,10 @@
|
||||
echo '</div>';
|
||||
|
||||
echo '</footer>';
|
||||
|
||||
|
||||
// Cookie notice
|
||||
$dc->displayCookieNotice();
|
||||
|
||||
|
||||
echo '</div>';
|
||||
|
@ -1,33 +1,8 @@
|
||||
function CookieAlertSubmit (form) {
|
||||
function cookie_confirm() {
|
||||
|
||||
$("#kuki").dialog({
|
||||
modal: true,
|
||||
buttons: {
|
||||
"DA, Nadaljuj s prijavo": function() {
|
||||
$(this).dialog( "close" );
|
||||
$('#' + form).submit();
|
||||
},
|
||||
"Ne": function() {
|
||||
$(this).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CookieAlertFB () {
|
||||
|
||||
$("#kuki").dialog({
|
||||
modal: true,
|
||||
buttons: {
|
||||
"DA, Nadaljuj s prijavo": function() {
|
||||
$(this).dialog( "close" );
|
||||
document.location.href='../api/fb_login.php';
|
||||
},
|
||||
"Ne": function() {
|
||||
$(this).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
$.get('frontend/simple/ajax.php?a=cookie_confirm', function(){
|
||||
$('.cookie_notice').animate({bottom:'-100%'}, {duration: 1000});
|
||||
});
|
||||
}
|
||||
|
||||
function LostPassword(alert_text) {
|
||||
@ -49,14 +24,6 @@ function LostPassword(alert_text) {
|
||||
}
|
||||
}
|
||||
|
||||
// function CheckEmailFP() {
|
||||
// var Email = document.getElementById('em');
|
||||
// console.log(Email.value);
|
||||
// if (Email.search('@') == -1 || Email.indexOf('.') == -1)
|
||||
// alert ('Prosimo, popravite email');
|
||||
// }
|
||||
|
||||
|
||||
// Posljemo zahtevo za izbris (iz simple frontenda)
|
||||
function sendGDPRRequest(){
|
||||
|
||||
|
@ -7597,6 +7597,10 @@ $lang = array (
|
||||
'simple_footer_company_contact' => "Kontakt",
|
||||
'simple_footer_company_web' => "Spletna stran",
|
||||
|
||||
'simple_cookie_1' => "Spletno mesto uporablja piškotke zaradi boljše uporabniške izkušnje.",
|
||||
'simple_cookie_2' => "Z uporabo naše spletne strani potrjujete, da se z njihovo uporabo strinjate. <a href=\"https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-1ka/politika-piskotkov\">Več o uporabi piškotkov >></a>",
|
||||
'simple_cookie_button'=> "Da, strinjam se",
|
||||
|
||||
|
||||
// GDPR //
|
||||
'srv_gdpr' => "GDPR",
|
||||
|
@ -7484,6 +7484,11 @@ $lang = array (
|
||||
'simple_footer_company_contact' => "Contact",
|
||||
'simple_footer_company_web' => "Website",
|
||||
|
||||
'simple_cookie_1' => "We use cookies on this site to enhance your user experience.",
|
||||
'simple_cookie_2' => "By clicking any link on this page you are giving your consent for us to set cookies. <a href=\"https://www.1ka.si/d/en/about/terms-of-use/cookie-policy\">More info >></a>",
|
||||
'simple_cookie_button'=> "Yes, I agree",
|
||||
|
||||
|
||||
|
||||
// GDPR //
|
||||
'srv_gdpr' => "GDPR",
|
||||
|
@ -42,6 +42,13 @@ a{
|
||||
color: lighten($color_blue, 10%);
|
||||
}
|
||||
}
|
||||
.aai a{
|
||||
color: #e35205;
|
||||
|
||||
&:hover{
|
||||
color: #fa6c21;
|
||||
}
|
||||
}
|
||||
|
||||
.red{
|
||||
color: red;
|
||||
|
@ -171,4 +171,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.cookie_notice{
|
||||
flex-direction: column;
|
||||
|
||||
.left{
|
||||
margin: 0 0 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
57
resources/sass/frontend_simple/modules/cookie.scss
Normal file
57
resources/sass/frontend_simple/modules/cookie.scss
Normal file
@ -0,0 +1,57 @@
|
||||
.cookie_notice{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
box-sizing: border-box;
|
||||
padding: 15px 20px;
|
||||
|
||||
background-color: white;
|
||||
border-top: 1px #666 solid;
|
||||
box-shadow: 0px 0px 5px 1px #999;
|
||||
|
||||
.left{
|
||||
margin-right: 50px;
|
||||
|
||||
text-align: left;
|
||||
|
||||
p{
|
||||
margin: 5px 0;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.right{
|
||||
|
||||
button{
|
||||
padding: 13px;
|
||||
|
||||
font-weight: 600;
|
||||
text-transform: none;
|
||||
|
||||
background-color: $color_blue;
|
||||
border-radius: 5px;
|
||||
|
||||
&:hover{
|
||||
background-color: lighten($color_blue, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.aai .cookie_notice{
|
||||
|
||||
button{
|
||||
background-color: #e35205;
|
||||
|
||||
&:hover{
|
||||
background-color: #fa6c21;
|
||||
}
|
||||
}
|
||||
}
|
@ -75,5 +75,8 @@ footer{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.aai footer a:hover{
|
||||
color: #e35205 !important;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
@import "./modules/header.scss";
|
||||
@import "./modules/main.scss";
|
||||
@import "./modules/footer.scss";
|
||||
@import "./modules/cookie.scss";
|
||||
|
||||
@import "./modules/landing_page.scss";
|
||||
@import "./modules/pages.scss";
|
||||
|
Loading…
x
Reference in New Issue
Block a user