Drupal9: popravki pri prijavi in oblikovanje rezultatov
This commit is contained in:
parent
fd932f94a8
commit
403dc448fe
@ -1187,7 +1187,7 @@ class ApiLogin
|
||||
// Preverimo ReCaptcha
|
||||
if (AppSettings::getInstance()->getSetting('google-secret_captcha') !== false) {
|
||||
$recaptchaResponse = $this->data['g-recaptcha-response'];
|
||||
$requestReCaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_captcha . '&response=' . $recaptchaResponse);
|
||||
$requestReCaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . AppSettings::getInstance()->getSetting('google-secret_captcha') . '&response=' . $recaptchaResponse);
|
||||
|
||||
if (!strstr($requestReCaptcha, 'true')) {
|
||||
$error['invalid_recaptcha'] = '1';
|
||||
|
@ -106,6 +106,8 @@ function prijava_1ka_theme()
|
||||
'prijava_z_racuni_modal_block' => [
|
||||
'variables' => [
|
||||
'lang' => $lang,
|
||||
'rememberMe' => (empty($_COOKIE['remember-me']) ? true : false),
|
||||
'url_google' => $url_google
|
||||
]
|
||||
]
|
||||
];
|
||||
|
@ -1,5 +1,5 @@
|
||||
{#{% if(prijavljen) %}#}
|
||||
<div class="rexister-modal" id="modal-aai-obvestilo">
|
||||
s <div class="rexister-modal" id="modal-other-login">
|
||||
|
||||
<div class="modal-box"><img src="/tema1ka/img/ikone/zapri.svg" class="closemodal">
|
||||
|
||||
@ -22,13 +22,13 @@
|
||||
|
||||
<div class="w-clearfix">
|
||||
<div class="col _4-4-12-12">
|
||||
<p>{{ lang['srv_gdpr_frontend_external_login'] }}</p>
|
||||
<p>{{ lang['srv_gdpr_frontend_external_login'] | raw }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-clearfix">
|
||||
<div class="col _4-4-12-12">
|
||||
<p>{{ lang['srv_gdrp_frontend_cookie'] }}</p>
|
||||
<p>{{ lang['srv_gdrp_frontend_cookie'] | raw }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
<div>
|
||||
<div class="col w-clearfix">
|
||||
<button class="submit-btn w-button prijava-ostale-nazaj" style="float: left;">{{ lang['back'] }}</button>
|
||||
<input type="submit" value="{{ lang['srv_custom_report_alert_yes'] }}" class="submit-btn w-button" id="submit-other-login">
|
||||
<input type="submit" value="{{ lang['srv_custom_report_alert_yes'] }}" class="submit-btn w-button" id="submit-other-login" style="float:right;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1123,6 +1123,22 @@ body {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
ul.seznam-tem {
|
||||
ist-style: none;
|
||||
}
|
||||
ul.seznam-tem li.prirocnik {
|
||||
padding: 13px 0px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
ul.seznam-tem li.prirocnik:first-child {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
ul.seznam-tem li.prirocnik a {
|
||||
color: #333333;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.modal, .rexister-modal {
|
||||
position: fixed;
|
||||
left: 0%;
|
||||
|
@ -491,3 +491,142 @@ function odpriAaiLoginObvestilo(){
|
||||
jQuery('#modal-open-login-obrazec').css('display', 'flex');
|
||||
}
|
||||
}
|
||||
|
||||
function CookieAlert(link, jezik, url) {
|
||||
var link = link || '/';
|
||||
var jezik = jezik || 'sl';
|
||||
var url = url || false;
|
||||
|
||||
if (link == 'fb') {
|
||||
link = '/frontend/api/api.php?action=login_facebook';
|
||||
// link = 'https://www.1ka.si/fb_login.php';
|
||||
}
|
||||
|
||||
// if (link == 'google') {
|
||||
// link = '/frontend/api/api.php?action=login_google';
|
||||
// }
|
||||
|
||||
if (link == 'aai') {
|
||||
link = 'https://aai.1ka.si/Shibboleth.sso/Login';
|
||||
}
|
||||
|
||||
var da = 'Nadaljuj';
|
||||
var ne = 'Prekliči';
|
||||
if (jezik == 'en') {
|
||||
var da = 'Continue';
|
||||
var ne = 'Cancel';
|
||||
}
|
||||
|
||||
jQuery('#kuki').dialog({
|
||||
height: "auto",
|
||||
width: 520,
|
||||
dialogClass: 'pojavno-okno-1ka',
|
||||
modal: true,
|
||||
buttons: [{
|
||||
text: da,
|
||||
class: "gumbi-pri-zunanji-prijavi",
|
||||
click: function () {
|
||||
jQuery(this).dialog("close");
|
||||
|
||||
document.location.href = link;
|
||||
}
|
||||
}, {
|
||||
text: ne,
|
||||
click: function () {
|
||||
jQuery(this).dialog("close");
|
||||
if (url) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
document.location.href = '/';
|
||||
}
|
||||
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
// Če strinjanje ne obstaja, prikažemo vse gumbe
|
||||
if(jQuery('#pogoji-strinjanje').length == 0)
|
||||
jQuery('.gumbi-pri-zunanji-prijavi').show();
|
||||
}
|
||||
|
||||
// Za google prijavo moramo postati formo - kar sestavimo direktno url
|
||||
/*
|
||||
<form id="googleLoginForm" action="https://accounts.google.com/o/oauth2/auth" method="get" style="display: none;">
|
||||
<input type="hidden" name="response_type" value="code" />
|
||||
<input type="hidden" name="client_id" value="<?=$google_login_client_id?>" />
|
||||
<input type="hidden" name="redirect_uri" value="https://www.1ka.si/utils/google-oauth2.php" />
|
||||
<input type="hidden" name="state" value="<?=(isset ($_GET['regFromEnglish']) && $_GET['regFromEnglish']=="1"?'regFromEnglish':'')?>" />
|
||||
<input type="hidden" name="scope" value="email" />
|
||||
<input type="hidden" name="access_type" value="online" />
|
||||
<input type="hidden" name="prompt" value="consent" />
|
||||
<input type="hidden" name="openid.realm" value="https://www.1ka.si" />
|
||||
</form>
|
||||
*/
|
||||
function CookieAlertGoogle(jezik, url) {
|
||||
//console.log('sa', link, jezik);
|
||||
|
||||
//var link = link || '/';
|
||||
var jezik = jezik || 'sl';
|
||||
var url = url || false;
|
||||
|
||||
// Sestavimo url
|
||||
var url = 'https://accounts.google.com/o/oauth2/auth?';
|
||||
|
||||
url += 'response_type=code';
|
||||
url += '&client_id=944153399779-m39ehn45vm6b64l0sac7hphtpm0esgqs.apps.googleusercontent.com';
|
||||
url += '&redirect_uri=https://www.1ka.si/frontend/api/google-oauth2.php';
|
||||
|
||||
if(jezik == 'en')
|
||||
url += '&state=regFromEnglish';
|
||||
else
|
||||
url += '&state=';
|
||||
|
||||
url += '&scope=email';
|
||||
url += '&access_type=online';
|
||||
url += '&prompt=consent';
|
||||
url += '&openid.realm=https://www.1ka.si';
|
||||
|
||||
|
||||
var da = 'Nadaljuj';
|
||||
var ne = 'Prekliči';
|
||||
if (jezik == 'en') {
|
||||
var da = 'Continue';
|
||||
var ne = 'Cancel';
|
||||
}
|
||||
|
||||
jQuery('#kuki').dialog({
|
||||
height: "auto",
|
||||
width: 520,
|
||||
dialogClass: 'pojavno-okno-1ka',
|
||||
modal: true,
|
||||
buttons: [{
|
||||
text: da,
|
||||
class: "gumbi-pri-zunanji-prijavi",
|
||||
click: function () {
|
||||
jQuery(this).dialog("close");
|
||||
|
||||
document.location.href = url;
|
||||
}
|
||||
}, {
|
||||
text: ne,
|
||||
click: function () {
|
||||
|
||||
jQuery('#pogoji-strinjanje').attr('checked', false);
|
||||
jQuery(this).dialog("close");
|
||||
|
||||
if (url) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
document.location.href = '/';
|
||||
}
|
||||
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
// Če strinjanje ne obstaja, prikažemo vse gumbe
|
||||
if(jQuery('#pogoji-strinjanje').length == 0)
|
||||
jQuery('.gumbi-pri-zunanji-prijavi').show();
|
||||
}
|
||||
|
@ -331,7 +331,7 @@
|
||||
|
||||
jQuery('#modal-other-login #login-' + atribut + '-title').show();
|
||||
jQuery('#submit-other-login').attr('data-redirect', 'url-' + atribut);
|
||||
jQuery('#modal-other-login').show();
|
||||
jQuery('#modal-other-login').css('display', 'flex');
|
||||
});
|
||||
|
||||
jQuery('#modal-other-login #submit-other-login').on('click', function () {
|
||||
@ -349,38 +349,17 @@
|
||||
/**end prijava z ostalimi računi **/
|
||||
|
||||
// Če uporabnik ni prijavljen potem moje ankete odprejo možnost za prijavo
|
||||
if (jQuery('[href*="/admin/survey/index.php?lang="]').length > 0 || jQuery('[data-href*="/admin/survey/index.php?lang="]').length > 0) {
|
||||
|
||||
// preverimo če obstaja piškot, da je uporabnik prijavljen
|
||||
if (document.cookie.indexOf('unam=') > 0) {
|
||||
var dataHref = jQuery('[data-href*="/admin/survey/index.php?lang="]');
|
||||
|
||||
if (dataHref.length > 0) {
|
||||
dataHref.attr('href', dataHref.attr('data-href'));
|
||||
|
||||
jQuery('#gumb-spletna-uporaba').attr('href', dataHref.attr('data-href')).attr('id', '');
|
||||
|
||||
dataHref.attr('data-href', '');
|
||||
}
|
||||
|
||||
var href = jQuery('[href*="/admin/survey/index.php?lang="]');
|
||||
if (href.length > 0 && dataHref.length < 1) {
|
||||
jQuery('#gumb-spletna-uporaba').attr('href', href.attr('href')).attr('id', '');
|
||||
}
|
||||
|
||||
|
||||
jQuery('[href*="/admin/survey/index.php?lang="]').removeClass('gumb-spletna-uporaba');
|
||||
jQuery('[href="/d/admin/survey"]').attr('href', '/admin/survey/index.php?lang='+lang()).removeClass('gumb-spletna-uporaba');
|
||||
|
||||
} else {
|
||||
var href = jQuery('[href*="/admin/survey/index.php?lang="]');
|
||||
|
||||
if (href.length > 0) {
|
||||
href.attr('data-href', href.attr('href')).attr('href', '#');
|
||||
jQuery('[href="/d/admin/survey"]').attr('href', '#').addClass('gumb-spletna-uporaba');
|
||||
|
||||
}
|
||||
|
||||
jQuery('[data-href*="/admin/survey/index.php?lang="]').addClass('gumb-spletna-uporaba');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Meni za mobilnike
|
||||
|
@ -56,3 +56,22 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ul.seznam-tem{
|
||||
ist-style: none;
|
||||
|
||||
li.prirocnik{
|
||||
padding: 13px 0px;
|
||||
border-bottom: 1px solid $siva-5;
|
||||
|
||||
&:first-child{
|
||||
border-top: 1px solid $siva-5;
|
||||
}
|
||||
|
||||
a{
|
||||
color: #333333;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -294,7 +294,7 @@
|
||||
{# Gumb #}
|
||||
<div class="row flex-desna flex">
|
||||
<div class="gumb">
|
||||
<a href="{% if uporabnik %}/admin/survey{% else %}#{% endif %}" class="button shrink main-button w-inline-block" class="ustvari-anketo">
|
||||
<a href="{% if uporabnik %}/admin/survey{% else %}#{% endif %}" class="button shrink main-button w-inline-block {% if uporabnik is empty %}modal-goto-registration{% endif %}">
|
||||
<div class="button-label">Ustvarite anketo</div>
|
||||
<img src="/tema1ka/svg/icons8-chevron-right-bela.svg" loading="lazy" class="button-right-arrow">
|
||||
<div class="button-flyin"></div>
|
||||
@ -356,7 +356,7 @@
|
||||
<div class="row flex">
|
||||
<div class="col c-33 gumb">
|
||||
<div class="buttons-row buttons-center" style="width: 200px">
|
||||
<a href="{% if uporabnik %}/admin/survey{% else %}#{% endif %}" class="button main-button w-inline-block">
|
||||
<a href="{% if uporabnik %}/admin/survey{% else %}#{% endif %}" class="button main-button w-inline-block {% if uporabnik is empty %}modal-goto-registration{% endif %}">
|
||||
<div class="button-label">Ustvarite anketo</div><img src="/tema1ka/svg/icons8-chevron-right-bela.svg" loading="lazy" alt="" class="button-right-arrow" style="transform: translate3d(0px, 0px, 0px) scale3d(1, 1, 1) rotateX(0deg) rotateY(0deg) rotateZ(0deg) skew(0deg, 0deg); transform-style: preserve-3d;">
|
||||
<div class="button-flyin" style="transform: translate3d(-100%, 0px, 0px) scale3d(1, 1, 1) rotateX(0deg) rotateY(0deg) rotateZ(0deg) skew(0deg, 0deg); transform-style: preserve-3d; display: block;"></div>
|
||||
</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user