Popravki, pri registraciji in trgovini
This commit is contained in:
parent
8500b9f6c9
commit
6f63a6ac50
@ -544,7 +544,7 @@ class ApiLogin
|
|||||||
if($this->method == 'AJAX'){
|
if($this->method == 'AJAX'){
|
||||||
|
|
||||||
$piskotek['unam'] = [
|
$piskotek['unam'] = [
|
||||||
'ime' => 'unme',
|
'ime' => 'unam',
|
||||||
'vrednost' => base64_encode($r['name'].' '.$r['surname']),
|
'vrednost' => base64_encode($r['name'].' '.$r['surname']),
|
||||||
'opcije' => [
|
'opcije' => [
|
||||||
'expires' => time() + $LifeTime,
|
'expires' => time() + $LifeTime,
|
||||||
@ -1870,6 +1870,8 @@ class ApiLogin
|
|||||||
|
|
||||||
// Ce emaila ni v bazi
|
// Ce emaila ni v bazi
|
||||||
$user_id_1ka = User::findByEmail($email);
|
$user_id_1ka = User::findByEmail($email);
|
||||||
|
return json_encode($user_id_1ka);
|
||||||
|
|
||||||
if (empty($user_id_1ka)) {
|
if (empty($user_id_1ka)) {
|
||||||
|
|
||||||
if($ajaxKlic){
|
if($ajaxKlic){
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
prijava_1ka.library:
|
prijava_1ka.library:
|
||||||
version: 1.x
|
version: 1.x
|
||||||
js:
|
js:
|
||||||
js/prijava_1ka_script.js: {}
|
js/login.js: {}
|
||||||
dependencies:
|
dependencies:
|
||||||
- core/jquery
|
- core/jquery
|
||||||
|
@ -6,10 +6,15 @@
|
|||||||
*/
|
*/
|
||||||
function prijava_1ka_theme()
|
function prijava_1ka_theme()
|
||||||
{
|
{
|
||||||
$google2fa =false;
|
|
||||||
|
|
||||||
|
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
|
||||||
|
include_once(__DIR__ . '/../../../../../../lang/1.php');
|
||||||
|
}else{
|
||||||
|
include_once(__DIR__ . '/../../../../../../lang/2.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
$google2fa =false;
|
||||||
|
|
||||||
include_once (__DIR__. '/../../../../../../lang/1.php');
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'prijava_block' => [
|
'prijava_block' => [
|
||||||
@ -18,7 +23,7 @@ function prijava_1ka_theme()
|
|||||||
'prijavljen' => (isset($_COOKIE['unam']) ? true : false),
|
'prijavljen' => (isset($_COOKIE['unam']) ? true : false),
|
||||||
'title_login' => ($google2fa ? $lang['google_2fa'] : $lang['cms_login_title']),
|
'title_login' => ($google2fa ? $lang['google_2fa'] : $lang['cms_login_title']),
|
||||||
'title_register_new_email' => ($google2fa ? $lang['google_2fa'] : $lang['cms_register_new_user_email']),
|
'title_register_new_email' => ($google2fa ? $lang['google_2fa'] : $lang['cms_register_new_user_email']),
|
||||||
'jezik' => 'Pridobi jezik forme',
|
'jezik' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
|
||||||
'google2fa_error' => '',
|
'google2fa_error' => '',
|
||||||
'email' => '',
|
'email' => '',
|
||||||
'password' => '',
|
'password' => '',
|
||||||
@ -32,7 +37,7 @@ function prijava_1ka_theme()
|
|||||||
'prijavljen' => (isset($_COOKIE['unam']) ? true : false),
|
'prijavljen' => (isset($_COOKIE['unam']) ? true : false),
|
||||||
'title_login' => ($google2fa ? $lang['google_2fa'] : $lang['cms_login_title']),
|
'title_login' => ($google2fa ? $lang['google_2fa'] : $lang['cms_login_title']),
|
||||||
'title_register_new_email' => ($google2fa ? $lang['google_2fa'] : $lang['cms_register_new_user_email']),
|
'title_register_new_email' => ($google2fa ? $lang['google_2fa'] : $lang['cms_register_new_user_email']),
|
||||||
'jezik' => 'Pridobi jezik forme',
|
'jezik' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
|
||||||
'google2fa_error' => '',
|
'google2fa_error' => '',
|
||||||
'email' => '',
|
'email' => '',
|
||||||
'password' => '',
|
'password' => '',
|
||||||
@ -49,7 +54,7 @@ function prijava_1ka_theme()
|
|||||||
'prijava_obnovitev_gesla_aktivacija_blok' => [
|
'prijava_obnovitev_gesla_aktivacija_blok' => [
|
||||||
'variables' => [
|
'variables' => [
|
||||||
'lang' => $lang,
|
'lang' => $lang,
|
||||||
'jezik' => 'Pridobi jezik forme',
|
'jezik' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
|
||||||
'prijavljen' => (isset($_COOKIE['unam']) ? true : false),
|
'prijavljen' => (isset($_COOKIE['unam']) ? true : false),
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -25,14 +25,16 @@
|
|||||||
|
|
||||||
<div class="w-clearfix">
|
<div class="w-clearfix">
|
||||||
<div class="col _3-3-3-12">
|
<div class="col _3-3-3-12">
|
||||||
<input type="email" value="" name="obnovitev-email" id="obnovitev-gesla" class="input-field w-input" placeholder="{{ lang['email'] }}" />
|
<input type="email" value="" name="obnovitev-email" id="obnovitev-gesla-email" class="input-field w-input" placeholder="{{ lang['email'] }}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="col w-clearfix">
|
<a href="#" class="button secondary-button w-inline-block" id="submit-lost-password">
|
||||||
<button type="button" value="{{ lang['srv_potrdi'] }}" data-wait="Please wait..." class="button submit w-button" id="submit-lost-password">
|
<div class="button-label">{{ lang['srv_potrdi'] }}</div>
|
||||||
</div>
|
<img src="/tema1ka/svg/icons8-chevron-right.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 button-flyin-secondary" 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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -10,17 +10,17 @@ s
|
|||||||
<span id="iskanje">
|
<span id="iskanje">
|
||||||
<img alt="{{ lang['cms_search'] }}" src="/tema1ka/img/ikone/iskanje.svg" style="height:18px; width:19px" />
|
<img alt="{{ lang['cms_search'] }}" src="/tema1ka/img/ikone/iskanje.svg" style="height:18px; width:19px" />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="only-pc" data-clarity-mask="True">';
|
<span class="only-pc" data-clarity-mask="True">';
|
||||||
|
|
||||||
{# // Izpišemo podaztke o registriranem uporabniku ali možnost za prijavo#}
|
{# // Izpišemo podaztke o registriranem uporabniku ali možnost za prijavo#}
|
||||||
|
|
||||||
{% if prijavljen %}
|
{% if prijavljen %}
|
||||||
| <div id="user-1ka">
|
| <div id="user-1ka">
|
||||||
<span class="user-name">
|
<span class="user-name">
|
||||||
{{ ime }} <span class="arrow-down"></span>
|
{{ ime }} <span class="arrow-down"></span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div id="user-menu">
|
<div id="user-menu">
|
||||||
<form name="odjava" method="post" action="/frontend/api/api.php?action=logout">
|
<form name="odjava" method="post" action="/frontend/api/api.php?action=logout">
|
||||||
<span class="user-submenu">
|
<span class="user-submenu">
|
||||||
@ -34,15 +34,14 @@ s
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
|
||||||
|
|
||||||
{#// $html_user .= ' <span class="user-1ka"></span> | <a href="' . (nalozi_ustrezen_jezik(TRUE) == 'sl' ? '/d/sl/registracija' : '/d/en/registration') . '">' . $lang['cms_register_link'] . '</a>#}
|
{#// $html_user .= ' <span class="user-1ka"></span> | <a href="' . (nalozi_ustrezen_jezik(TRUE) == 'sl' ? '/d/sl/registracija' : '/d/en/registration') . '">' . $lang['cms_register_link'] . '</a>#}
|
||||||
{#// | <a href="' . (nalozi_ustrezen_jezik(TRUE) == 'sl' ? '/d/sl/prijava' : '/d/en/login') . '">' . $lang['cms_login_link'] . '</a>';#}
|
{#// | <a href="' . (nalozi_ustrezen_jezik(TRUE) == 'sl' ? '/d/sl/prijava' : '/d/en/login') . '">' . $lang['cms_login_link'] . '</a>';#}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
registracija-1ka:
|
registracija_1ka.library:
|
||||||
version: 1.x
|
version: 1.x
|
||||||
|
|
||||||
js:
|
js:
|
||||||
js/registracija_1ka_script.js: {}
|
#js/registracija_1ka_script.js: {}
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- core/jquery
|
- core/jquery
|
||||||
|
@ -2,10 +2,18 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Omogči, da se uporabi Twig templaet
|
* Omogči, da se uporabi Twig templaet
|
||||||
|
* @return array[][][]
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Implements hook_theme().
|
||||||
*/
|
*/
|
||||||
function registracija_1ka_theme()
|
function registracija_1ka_theme()
|
||||||
{
|
{
|
||||||
include_once (__DIR__. '/../../../../../../lang/1.php');
|
if(\Drupal::languageManager()->getCurrentLanguage()->getId() == 'sl') {
|
||||||
|
include(__DIR__ . '/../../../../../../lang/1.php');
|
||||||
|
}else{
|
||||||
|
include(__DIR__ . '/../../../../../../lang/2.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// $lang['cms_register_user_text'] = str_replace('GOOGLE_URL', variable_get('1ka_google_prijava'), $lang['cms_register_user_text']);
|
// $lang['cms_register_user_text'] = str_replace('GOOGLE_URL', variable_get('1ka_google_prijava'), $lang['cms_register_user_text']);
|
||||||
@ -22,26 +30,30 @@ function registracija_1ka_theme()
|
|||||||
// require(drupal_get_path('module', 'registracija_1ka') . '/../../../../../../settings_optional.php');
|
// require(drupal_get_path('module', 'registracija_1ka') . '/../../../../../../settings_optional.php');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Pridobimo jezik iz izbranega jezika Drupala
|
|
||||||
$jezik = 'sl';
|
|
||||||
|
|
||||||
$recaptcha_sitekey = ''; // pridobi podatke settings_optional
|
$recaptcha_sitekey = ''; // pridobi podatke settings_optional
|
||||||
|
|
||||||
// Pridobi vse $_GET parametre in jih shrani v polje
|
// Pridobi vse $_GET parametre in jih shrani v polje
|
||||||
$parametri = []; //drupal_get_query_parameters();
|
// $parametri = []; //drupal_get_query_parameters();
|
||||||
$register_url = '/frontend/api/api.php?action=register';
|
// $register_url = '/frontend/api/api.php?action=register';
|
||||||
$obvestila = []; //$this->preveriNapake($parametri);
|
// $obvestila = []; //$this->preveriNapake($parametri);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'registracija_block' => [
|
'registracija_block' => [
|
||||||
'variables' => [
|
'variables' => [
|
||||||
'lang' => $lang ?? [],
|
'lang' => $lang ?? [],
|
||||||
'jezik' => $jezik ?? 'sl',
|
'jezik' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
|
||||||
//'obvestila' => $obvestila,
|
//'obvestila' => $obvestila,
|
||||||
'recaptcha_sitekey' => $recaptcha_sitekey ?? '',
|
'recaptcha_sitekey' => $recaptcha_sitekey ?? '',
|
||||||
'login__link' => str_replace('#URL#', '#', $lang['cms_register_login_link'])
|
'login__link' => (isset($lang['cms_register_login_link']) ? str_replace('#URL#', '#', $lang['cms_register_login_link']) : '')
|
||||||
]
|
]
|
||||||
],
|
]
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Development
|
||||||
|
function registracija_1ka_preprocess_block(&$vars)
|
||||||
|
{
|
||||||
|
if($vars['plugin_id'] == 'registracija_block'){
|
||||||
|
$var['#cache'] ['max-age'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -4,103 +4,29 @@ namespace Drupal\registracija_1ka\Plugin\Block;
|
|||||||
|
|
||||||
use Drupal\Core\Block\BlockBase;
|
use Drupal\Core\Block\BlockBase;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Priskrbi obrazec za prijavo
|
* Priskrbi obrazec za prijavo
|
||||||
*
|
*
|
||||||
* @Block(
|
* @Block(
|
||||||
* id = "registracija_intro_block",
|
* id = "registracija_block",
|
||||||
* admin_label = @Translation("Registracija: novega uporabnika 1KA (1KA, AAI)"),
|
* admin_label = @Translation("Registracija: Obrazec za registracijo novega uporabnika"),
|
||||||
* category = @Translation("1KA"),
|
* category = @Translation("1KA"),
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
class RegistracijaBlock extends BlockBase {
|
class RegistracijaBlock extends BlockBase {
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function build() {
|
public function build() {
|
||||||
|
|
||||||
return [
|
|
||||||
'#theme' => 'registracija_block',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
private function preveriNapake($parametri)
|
|
||||||
{
|
|
||||||
|
|
||||||
$lang = nalozi_ustrezen_jezik();
|
|
||||||
|
|
||||||
$napaka = [];
|
|
||||||
|
|
||||||
|
|
||||||
// Napaka pri emailu in opozorilo
|
|
||||||
$error_email = FALSE;
|
|
||||||
if (!empty($parametri['missing_email']) && $parametri['missing_email'] == 1) {
|
|
||||||
|
|
||||||
$error_email = TRUE;
|
|
||||||
$napaka[] = $lang['cms_error_missing_email'];
|
|
||||||
|
|
||||||
}elseif (!empty($parametri['invalid_email']) && $parametri['invalid_email'] == 1){
|
|
||||||
|
|
||||||
$error_email = TRUE;
|
|
||||||
$napaka[] = $lang['cms_error_email'];
|
|
||||||
|
|
||||||
} elseif (!empty($parametri['existing_email']) && $parametri['existing_email'] == 1){
|
|
||||||
|
|
||||||
$error_email = TRUE;
|
|
||||||
$napaka[] = str_replace('RESTORE_PASSWORD',
|
|
||||||
'/frontend/api/api.php?action=reset_password&email=' . $parametri['email'],
|
|
||||||
$lang['cms_error_email_took']);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Napaka pri imenu
|
|
||||||
$error_ime = FALSE;
|
|
||||||
if (!empty($parametri['missing_ime']) && $parametri['missing_ime'] == 1) {
|
|
||||||
|
|
||||||
$error_ime = TRUE;
|
|
||||||
$napaka[] = $lang['cms_error_user_field_empty'];
|
|
||||||
|
|
||||||
} elseif (!empty($parametri['existing_ime']) && $parametri['existing_ime'] == 1) {
|
|
||||||
|
|
||||||
$error_ime = TRUE;
|
|
||||||
$napaka[] = $lang['cms_error_user_took'];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recaptcha error
|
|
||||||
$error_recaptcha = FALSE;
|
|
||||||
if (!empty($parametri['invalid_recaptcha']) && $parametri['invalid_recaptcha'] == 1) {
|
|
||||||
|
|
||||||
$error_recaptcha = TRUE;
|
|
||||||
$napaka[] = $lang['cms_error_recaptcha'];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Napaka pri napačno vpisanih geslih
|
|
||||||
$error_geslo = FALSE;
|
|
||||||
if (!empty($parametri['pass_mismatch']) && $parametri['pass_mismatch'] == 1) {
|
|
||||||
|
|
||||||
$error_geslo = TRUE;
|
|
||||||
$napaka[] = $lang['cms_error_password_incorrect'];
|
|
||||||
}
|
|
||||||
// Geslo ni dovolj kompleksno
|
|
||||||
if (!$error_geslo && !empty($parametri['pass_complex']) && $parametri['pass_complex'] == 1) {
|
|
||||||
|
|
||||||
$error_geslo = TRUE;
|
|
||||||
$napaka[] = $lang['password_err_complex'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'napaka' => $napaka,
|
'#theme' => 'registracija_block',
|
||||||
'error_geslo' => $error_geslo,
|
|
||||||
'error_ime' => $error_ime,
|
|
||||||
'error_email' => $error_email,
|
|
||||||
'error_recaptcha' => $error_recaptcha
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
public function getCacheMaxAge() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
<div class="rexister-modal" id="modal-registration">
|
<div class="rexister-modal" id="modal-registration">
|
||||||
<div class="modal-box w-max-1024"><img src="/tema1ka/img/ikone/zapri.svg" class="closemodal">
|
<div class="modal-box w-max-1024"><img src="/tema1ka/img/ikone/zapri.svg" class="closemodal">
|
||||||
|
|
||||||
<div class="row glavni-naslov">
|
<div class="row glavni-naslov">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h3 class="modra center">{{ lang['cms_register_title'] }}</h3>
|
<h3 class="modra center">{{ lang['cms_register_title'] }}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# // Forma za registracijo#}
|
{# // Forma za registracijo#}
|
||||||
<div id="register-form" class="dva-stolpca">
|
<div id="register-form" class="dva-stolpca">
|
||||||
|
|
||||||
{# //Registracija#}
|
{# //Registracija#}
|
||||||
<div class="registracija forma">
|
<div class="registracija forma">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h4>{{ lang['cms_register_new_user_email'] }}</h4>
|
<h4>{{ lang['cms_register_new_user_email'] }}</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-form">
|
<div class="w-form">
|
||||||
<form name="registracija" id="registracija-uporabnika" class="{{ jezik }}" action="{{ register_url }}" method="post">
|
<form name="registracija" id="registracija-uporabnika" class="{{ jezik }}" action="{{ register_url }}" method="post">
|
||||||
<input type="hidden" name="jezik" value="{{ jezik }}"/>
|
<input type="hidden" name="jezik" value="{{ jezik }}"/>
|
||||||
|
|
||||||
<div class="w-clearfix">
|
<div class="w-clearfix">
|
||||||
<div class="col _6-6-6-12">
|
<div class="col _6-6-6-12">
|
||||||
<input type="email" class="input-field w-input {% if obvestila['error_email'] %} error-field {% endif %}" name="email" placeholder="{{ lang['email'] }}" onchange="InsertName();" onblur="CheckEmail(\'{{ lang['cms_register_user_email_incorrect'] }}\');CheckEmailTypo(\'{{ lang['cms_register_user_typo_email'] }}\')" value="{% if parametri['email'] %} {{ parametri['email'] }} {% endif %}">
|
<input type="email" class="input-field w-input {% if obvestila['error_email'] %} error-field {% endif %}" name="email" placeholder="{{ lang['email'] }}" onchange="InsertName();" onblur="CheckEmail(\'{{ lang['cms_register_user_email_incorrect'] }}\');CheckEmailTypo(\'{{ lang['cms_register_user_typo_email'] }}\')" value="{% if parametri['email'] %} {{ parametri['email'] }} {% endif %}">
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<input type="text" id="registracija-vzdevek" class="input-field w-input {% if obvestila['error_ime'] %} error-field {% endif %}" name="ime" placeholder="{{ lang['cms_register_user_nickname'] }}" value="{% if parametri['ime'] %} {{ parametri['ime'] }} {% endif %}">
|
<input type="text" id="registracija-vzdevek" class="input-field w-input {% if obvestila['error_ime'] %} error-field {% endif %}" name="ime" placeholder="{{ lang['cms_register_user_nickname'] }}" value="{% if parametri['ime'] %} {{ parametri['ime'] }} {% endif %}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-clearfix">
|
<div class="w-clearfix">
|
||||||
<div class="col _6-6-6-12">
|
<div class="col _6-6-6-12">
|
||||||
<input type="password" class="input-field w-input {% if obvestila['error_geslo'] %} error-field {% endif %}" value="" id="geslo" name="geslo" placeholder="{{ lang['cms_register_user_password'] }}">
|
<input type="password" class="input-field w-input {% if obvestila['error_geslo'] %} error-field {% endif %}" value="" id="geslo" name="geslo" placeholder="{{ lang['cms_register_user_password'] }}">
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<input type="password" class="input-field w-input {% if obvestila['error_geslo'] %} error-field {% endif %}" value="" id="geslo2" name="geslo2" placeholder="{{ lang['cms_register_user_repeat_password'] }}">
|
<input type="password" class="input-field w-input {% if obvestila['error_geslo'] %} error-field {% endif %}" value="" id="geslo2" name="geslo2" placeholder="{{ lang['cms_register_user_repeat_password'] }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if recaptcha_sitekey %} {
|
{% if recaptcha_sitekey %} {
|
||||||
<div class="w-clearfix">
|
<div class="w-clearfix">
|
||||||
<div class="col _6-6-6-12">
|
<div class="col _6-6-6-12">
|
||||||
@ -48,12 +48,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# // SPAM protection, če nimamo reCaptcha#}
|
{# // SPAM protection, če nimamo reCaptcha#}
|
||||||
<div class="form_row">
|
<div class="form_row">
|
||||||
<input type="text" class="varnostno-polje" name="varnostno-polje" value="" style="display: none;"/>
|
<input type="text" class="varnostno-polje" name="varnostno-polje" value="" style="display: none;"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="col toppadding">
|
<div class="col toppadding">
|
||||||
{# // Pogoji uporabe#}
|
{# // Pogoji uporabe#}
|
||||||
@ -62,7 +62,7 @@
|
|||||||
<span class="checkbox-display {% if obvestila['missing_agree'] %} error-field {% endif %}"></span>
|
<span class="checkbox-display {% if obvestila['missing_agree'] %} error-field {% endif %}"></span>
|
||||||
<span id="agreelabel" {% if obvestila['missing_agree'] %} error-field {% endif %}><label for="IAgree" class="checkbox-label w-form-label"> {{ lang['cms_register_user_terms_of_use'] | raw }}</label></span>
|
<span id="agreelabel" {% if obvestila['missing_agree'] %} error-field {% endif %}><label for="IAgree" class="checkbox-label w-form-label"> {{ lang['cms_register_user_terms_of_use'] | raw }}</label></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# // GDPR strinjanje za email obveščanje - v bazi vse nove zahtevke postavimo na 2 ali 0, če se ne strinja#}
|
{# // GDPR strinjanje za email obveščanje - v bazi vse nove zahtevke postavimo na 2 ali 0, če se ne strinja#}
|
||||||
<div class="checkbox-field w-checkbox">
|
<div class="checkbox-field w-checkbox">
|
||||||
<input type="checkbox" id="GdprAgree" name="gdpr-agree" value="1" class="cb w-checkbox-input" {% if parametri['gdpr'] and parametri['gdpr'] == 1 %} checked="checked" {% endif %}>
|
<input type="checkbox" id="GdprAgree" name="gdpr-agree" value="1" class="cb w-checkbox-input" {% if parametri['gdpr'] and parametri['gdpr'] == 1 %} checked="checked" {% endif %}>
|
||||||
@ -75,113 +75,113 @@
|
|||||||
</span>
|
</span>
|
||||||
<div id="gdpr-vec-text">{{ lang['cms_register_gdpr_agree_explain'] }}</div>
|
<div id="gdpr-vec-text">{{ lang['cms_register_gdpr_agree_explain'] }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="col w-clearfix">
|
<div class="col w-clearfix">
|
||||||
<a href="#" class="submit-btn w-button">{{ lang['next1'] }}</a>
|
<a href="#" class="submit-btn w-button">{{ lang['next1'] }}</a>
|
||||||
<p class="paragraph" class="odpri-prijavo">{{ login_link }}</p>
|
<p class="paragraph" class="odpri-prijavo">{{ login_link }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{# // Vse obstoječe napake, damo v list#}
|
{# // Vse obstoječe napake, damo v list#}
|
||||||
<div class="w-form-fail napaka-registracija"></div>
|
<div class="w-form-fail napaka-registracija"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# // Prijava preko računov#}
|
{# // Prijava preko računov#}
|
||||||
<div class="preko-racunov">
|
<div class="preko-racunov">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h4>{{ lang['cms_register_other_email'] }}</h4>
|
<h4>{{ lang['cms_register_other_email'] }}</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ostale-prijave">
|
<div class="ostale-prijave">
|
||||||
|
|
||||||
<div class="ikona ikona-custom-login ikona-facebook" data-login="facebook">
|
<div class="ikona ikona-custom-login ikona-facebook" data-login="facebook">
|
||||||
<div class="gumb">
|
<div class="gumb">
|
||||||
<img alt="{{ lang['login_with_facebook'] }}" src="/tema1ka/svg/prijava-facebook.svg"/>
|
<img alt="{{ lang['login_with_facebook'] }}" src="/tema1ka/svg/prijava-facebook.svg"/>
|
||||||
{{ lang['login_with_facebook'] }}
|
{{ lang['login_with_facebook'] }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ikona ikona-custom-login ikona-google" data-login="google">
|
<div class="ikona ikona-custom-login ikona-google" data-login="google">
|
||||||
<div class="gumb">
|
<div class="gumb">
|
||||||
<img alt="{{ lang['login_with_google'] }}" src="/tema1ka/svg/prijava-gmail.svg" style="height: 1.5rem;"/>
|
<img alt="{{ lang['login_with_google'] }}" src="/tema1ka/svg/prijava-gmail.svg" style="height: 1.5rem;"/>
|
||||||
{{ lang['login_with_google'] }}
|
{{ lang['login_with_google'] }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{# // Email confirm#}
|
{# // Email confirm#}
|
||||||
<div id="register-form-confirm">
|
<div id="register-form-confirm">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h4>{{ lang['cms_register_new_user_email'] }}</h4>
|
<h4>{{ lang['cms_register_new_user_email'] }}</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{# // Besedilo za pred podatki#}
|
{# // Besedilo za pred podatki#}
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{{ lang['check_login_data'] }}
|
{{ lang['check_login_data'] | raw }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="preged-podatkov">
|
<div class="preged-podatkov">
|
||||||
|
|
||||||
{# // Email#}
|
{# // Email#}
|
||||||
<div class="col pb">
|
<div class="col pb">
|
||||||
<span class="label">{{ lang['email'] }}:</span>
|
<span class="label">{{ lang['email'] }}:</span>
|
||||||
<span class="field oznacen-rdec" id="reg-confirm-email"></span>
|
<span class="field oznacen-rdec" id="reg-confirm-email"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# // Vzdevek#}
|
{# // Vzdevek#}
|
||||||
<div class="col pb">
|
<div class="col pb">
|
||||||
<span class="label">{{ lang['cms_register_user_nickname'] }}:</span>
|
<span class="label">{{ lang['cms_register_user_nickname'] }}:</span>
|
||||||
<span class="field" id="reg-confirm-ime"></span>
|
<span class="field" id="reg-confirm-ime"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# // Geslo#}
|
{# // Geslo#}
|
||||||
<div class="col pb">
|
<div class="col pb">
|
||||||
<span class="label">{{ lang['cms_register_user_password'] }}:</span>
|
<span class="label">{{ lang['cms_register_user_password'] }}:</span>
|
||||||
<span class="field" id="reg-confirm-geslo"></span>
|
<span class="field" id="reg-confirm-geslo"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# // Obveščanje#}
|
{# // Obveščanje#}
|
||||||
<div class="col pb">
|
<div class="col pb">
|
||||||
<span class="label">{{ lang['cms_register_confirm_notification'] }}:</span>
|
<span class="label">{{ lang['cms_register_confirm_notification'] }}:</span>
|
||||||
<span class="field" id="reg-confirm-gdpr"></span>
|
<span class="field" id="reg-confirm-gdpr"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col w-clearfix">
|
<div class="col w-clearfix">
|
||||||
<a href="#" class="submit-btn w-button" id="reg-confirm-next">{{ lang['next1'] }}</a>
|
<a href="#" class="submit-btn w-button" id="reg-confirm-next">{{ lang['next1'] }}</a>
|
||||||
<a href="#" class="submit-btn w-button" style="float: left;" id="reg-confirm-back">{{ lang['back'] }}</a>
|
<a href="#" class="submit-btn w-button" style="float: left;" id="reg-confirm-back">{{ lang['back'] }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# // Email je bil poslan#}
|
{# // Email je bil poslan#}
|
||||||
<div id="register-form-email-sent">
|
<div id="register-form-email-sent">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -189,15 +189,15 @@
|
|||||||
<h3>{{ lang['user_confirm_h'] }}</h3>
|
<h3>{{ lang['user_confirm_h'] }}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col" style="display: block;">
|
||||||
{{ lang['user_confirm_p'] }}
|
{{ lang['user_confirm_p'] | raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,6 +78,7 @@ class CenikController extends ControllerBase
|
|||||||
protected function getVariables() {
|
protected function getVariables() {
|
||||||
$variables = [
|
$variables = [
|
||||||
'module' => $this->getModuleName(),
|
'module' => $this->getModuleName(),
|
||||||
|
'email_uporabnika' => (!empty($_COOKIE['uid']) ? base64_decode($_COOKIE['uid']) : ''),
|
||||||
];
|
];
|
||||||
return $variables;
|
return $variables;
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ class NarociloController extends ControllerBase
|
|||||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||||
|
|
||||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$ip = $_SERVER['REMOTE_ADDR'];
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
@ -105,7 +106,6 @@ class NarociloController extends ControllerBase
|
|||||||
$request_method = 'POST';
|
$request_method = 'POST';
|
||||||
$post_data = ['ip' => $ip];
|
$post_data = ['ip' => $ip];
|
||||||
$raw_post_data = http_build_query($post_data);
|
$raw_post_data = http_build_query($post_data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pripravimo stvari za izdelavo tokena
|
// Pripravimo stvari za izdelavo tokena
|
||||||
|
@ -18,12 +18,12 @@ trgovina_1ka.izvedi_nakup:
|
|||||||
trgovina_1ka.nakupovanje_api:
|
trgovina_1ka.nakupovanje_api:
|
||||||
path: '/nakupovanje-api/{parameter}'
|
path: '/nakupovanje-api/{parameter}'
|
||||||
defaults:
|
defaults:
|
||||||
_form: '\Drupal\trgovina_1ka\Controller\NarociloController::apiKlici'
|
_controller: '\Drupal\trgovina_1ka\Controller\NarociloController::apiKlici'
|
||||||
_title: 'Nakupovanje API'
|
_title: 'Nakupovanje API'
|
||||||
url_parameter: ''
|
url_parameter: ''
|
||||||
methods: 'POST'
|
methods: 'POST'
|
||||||
requirements:
|
requirements:
|
||||||
_permission: 'access content'
|
_permission: 'TRUE'
|
||||||
## END cenik zasebni ##
|
## END cenik zasebni ##
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
jQuery('.obvestilo').empty().hide();
|
jQuery('.obvestilo').empty().hide();
|
||||||
jQuery('#input-obnovitev-email').removeClass('error');
|
jQuery('#input-obnovitev-email').removeClass('error');
|
||||||
|
|
||||||
var emailObnovitev = jQuery('#input-obnovitev-email').val();
|
var emailObnovitev = jQuery('#obnovitev-gesla-email').val();
|
||||||
|
|
||||||
if (emailObnovitev.length == 0 || emailObnovitev.length > 1 && (emailObnovitev.search('@') == -1 || emailObnovitev.indexOf('.') == -1)) {
|
if (emailObnovitev.length == 0 || emailObnovitev.length > 1 && (emailObnovitev.search('@') == -1 || emailObnovitev.indexOf('.') == -1)) {
|
||||||
jQuery('#input-obnovitev-email').addClass('error');
|
jQuery('#input-obnovitev-email').addClass('error');
|
||||||
@ -71,10 +71,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// V kolikor je vse ok poljemo POST request, da preverimo v bazi
|
// V kolikor je vse ok poljemo POST request, da preverimo v bazi
|
||||||
jQuery.post('/frontend/api/api.php?action=reset_password', {
|
jQuery.post('/api/drupal/reset_password', {
|
||||||
email: emailObnovitev,
|
email: emailObnovitev,
|
||||||
ajax: true,
|
ajax: true,
|
||||||
jezik: jQuery('[name="jezik"]').val()
|
jezik: pridobiJezik()
|
||||||
}).done(function (val) {
|
}).done(function (val) {
|
||||||
val = JSON.parse(val);
|
val = JSON.parse(val);
|
||||||
|
|
||||||
@ -101,6 +101,69 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// AKtivacija izgubljenega gesla
|
||||||
|
if (window.location.hash == '#aktivacija-gesla') {
|
||||||
|
jQuery('#modal-lost-password-activate').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery('#submit-lost-password-activation').on('click', function () {
|
||||||
|
jQuery('.w-form-fail').hide();
|
||||||
|
jQuery('.error').removeClass('error');
|
||||||
|
|
||||||
|
var email = jQuery('#aktivacija-email').val();
|
||||||
|
var geslo = jQuery('#aktivacija-geslo').val();
|
||||||
|
var koda = '';
|
||||||
|
var jezik = jQuery('#modal-lost-password [name="jezik"]').val();
|
||||||
|
|
||||||
|
var results = new RegExp('[\?&]code=([^&#]*)').exec(window.location.href);
|
||||||
|
if (results[1].length > 10)
|
||||||
|
koda = results[1];
|
||||||
|
|
||||||
|
if (email.length == 0 || geslo.length == 0 || koda.length == 0) {
|
||||||
|
jQuery('#error-aktivacija-gesla').show();
|
||||||
|
|
||||||
|
if (email.length == 0) {
|
||||||
|
jQuery('#aktivacija-email').addClass('error');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (geslo.length == 0) {
|
||||||
|
jQuery('#aktivacija-geslo').addClass('error');
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// V kolikor je vse ok poljemo POST request, da preverimo v bazi
|
||||||
|
jQuery.post('/frontend/api/api.php?action=reset_password_activate', {
|
||||||
|
email: email,
|
||||||
|
pass: geslo,
|
||||||
|
code: koda,
|
||||||
|
ajax: true,
|
||||||
|
lang: jezik
|
||||||
|
}).done(function (val) {
|
||||||
|
val = JSON.parse(val);
|
||||||
|
|
||||||
|
jQuery('#error-aktivacija-gesla').removeClass('w-form-fail').removeClass('w-form-done').html('').hide();
|
||||||
|
|
||||||
|
if (val.type == 'success') {
|
||||||
|
jQuery('#error-aktivacija-gesla').addClass('w-form-done').html('<div>' + val.text + '</div>').show();
|
||||||
|
|
||||||
|
// Če je bil email uspešno poslal potem okno zapremo po 5 sekundah
|
||||||
|
setTimeout(function () {
|
||||||
|
window.location.href = val.action;
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Napaka, če email ne obstaja v bazi
|
||||||
|
jQuery('#error-aktivacija-gesla').addClass('w-form-fail').html('<div>' + val.text + '</div>').show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,6 +172,10 @@
|
|||||||
|
|
||||||
})(jQuery, Drupal, this, this.document);
|
})(jQuery, Drupal, this, this.document);
|
||||||
|
|
||||||
|
function pridobiJezik(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function vrniBesediloNapake(besedilo){
|
function vrniBesediloNapake(besedilo){
|
||||||
let sporocilo;
|
let sporocilo;
|
||||||
|
|
||||||
@ -236,7 +303,7 @@ function preveriZaTipkarskoNapakoVemailu(uporabnikovaDomena, domena) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function lang() {
|
function pridobiJezik() {
|
||||||
return jQuery('html')[0].lang;
|
return jQuery('html')[0].lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +312,7 @@ function odpriAaiLoginObvestilo(){
|
|||||||
jQuery('.nakup-prijava').hide();
|
jQuery('.nakup-prijava').hide();
|
||||||
jQuery('.modal-intro-login-text').css('display', 'flex');
|
jQuery('.modal-intro-login-text').css('display', 'flex');
|
||||||
|
|
||||||
if(jQuery('html')[0].lang == 'sl') {
|
if(pridobiJezik() == 'sl') {
|
||||||
jQuery('#modal-open-1ka').removeClass('modal-goto-registration').addClass('modal-open-login-obrazec');
|
jQuery('#modal-open-1ka').removeClass('modal-goto-registration').addClass('modal-open-login-obrazec');
|
||||||
jQuery('#modal-info-login').css('display', 'flex');
|
jQuery('#modal-info-login').css('display', 'flex');
|
||||||
|
|
||||||
|
@ -26,42 +26,42 @@
|
|||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
// Drupal nova prijava
|
// Drupal nova prijava
|
||||||
jQuery('.submit-prijava').on('click', function(){
|
// jQuery('.submit-prijava').on('click', function(){
|
||||||
// ODstranimo vse napake
|
// // ODstranimo vse napake
|
||||||
jQuery('.error-field').removeClass('error-field')
|
// jQuery('.error-field').removeClass('error-field');
|
||||||
|
//
|
||||||
|
//
|
||||||
jQuery(':input[required]:visible').each(function () {
|
// jQuery(':input[required]:visible').each(function () {
|
||||||
if (jQuery(this).val() == '') {
|
// if (jQuery(this).val() == '') {
|
||||||
jQuery(this).addClass('error-field');
|
// jQuery(this).addClass('error-field');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
if( jQuery('.error-field').length > 0){
|
// if( jQuery('.error-field').length > 0){
|
||||||
return false
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
jQuery('#prijava-1ka error-message').append('').hide();
|
// jQuery('#prijava-1ka error-message').append('').hide();
|
||||||
|
//
|
||||||
var sendVariables = jQuery('#forma-prijava :input').serialize()
|
// var sendVariables = jQuery('#forma-prijava :input').serialize()
|
||||||
var url = jQuery('#forma-prijava').attr('action')
|
// var url = jQuery('#forma-prijava').attr('action')
|
||||||
|
//
|
||||||
jQuery.post(url, sendVariables, function (data) {
|
// jQuery.post(url, sendVariables, function (data) {
|
||||||
var response = JSON.parse(data)
|
// var response = JSON.parse(data)
|
||||||
|
//
|
||||||
if(response.type == 'success'){
|
// if(response.type == 'success'){
|
||||||
|
//
|
||||||
return window.location = response.data.url
|
// return window.location = response.data.url
|
||||||
|
//
|
||||||
} else if(response.type == 'error') {
|
// } else if(response.type == 'error') {
|
||||||
|
//
|
||||||
jQuery('#prijava-1ka error-message').append(response.message).show();
|
// jQuery('#prijava-1ka error-message').append(response.message).show();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -265,7 +265,7 @@
|
|||||||
|
|
||||||
// Prijava modal
|
// Prijava modal
|
||||||
jQuery('.modal-open-login-obrazec').on('click', function () {
|
jQuery('.modal-open-login-obrazec').on('click', function () {
|
||||||
jQuery('.rexister-modal').hide();
|
jQuery('.rexister-modal').css('display', 'none');
|
||||||
jQuery('#modal-login').css('display', 'flex');
|
jQuery('#modal-login').css('display', 'flex');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -479,112 +479,114 @@
|
|||||||
|
|
||||||
|
|
||||||
// Izgubljeno geslo
|
// Izgubljeno geslo
|
||||||
jQuery('#open-modal-lost-password').on('click', function () {
|
// jQuery('#open-modal-lost-password').on('click', function () {
|
||||||
jQuery('#modal-login').hide();
|
// jQuery('#modal-login').hide();
|
||||||
jQuery('#modal-lost-password').css('display', 'flex');
|
// jQuery('#modal-lost-password').css('display', 'flex');
|
||||||
});
|
// });
|
||||||
jQuery('#submit-lost-password').on('click', function () {
|
// jQuery('#submit-lost-password').on('click', function () {
|
||||||
jQuery('.w-form-fail').hide();
|
// jQuery('.w-form-fail').hide();
|
||||||
|
//
|
||||||
|
// var emailObnovitev = jQuery('#obnovitev-gesla').val();
|
||||||
|
// var jezik = jQuery('#modal-lost-password [name="jezik"]').val();
|
||||||
|
//
|
||||||
|
// if (emailObnovitev.length == 0 || emailObnovitev.length > 1 && (emailObnovitev.search('@') == -1 || emailObnovitev.indexOf('.') == -1)) {
|
||||||
|
// jQuery('#error-lost-password').show();
|
||||||
|
//
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // V kolikor je vse ok poljemo POST request, da preverimo v bazi
|
||||||
|
// jQuery.post('/frontend/api/api.php?action=reset_password', {
|
||||||
|
// email: emailObnovitev,
|
||||||
|
// ajax: true,
|
||||||
|
// jezik: jezik
|
||||||
|
// }).done(function (val) {
|
||||||
|
// val = JSON.parse(val);
|
||||||
|
//
|
||||||
|
// jQuery('#modal-lost-password .w-form-done').html('').hide();
|
||||||
|
// jQuery('#modal-lost-password .w-form-fail').hide();
|
||||||
|
//
|
||||||
|
// if (val.type == 'success') {
|
||||||
|
// jQuery('#modal-lost-password .w-form-done').html('<div>' + val.text + '</div>').show();
|
||||||
|
//
|
||||||
|
// // Če je bil email uspešno poslal potem okno zapremo po 5 sekundah
|
||||||
|
// setTimeout(function () {
|
||||||
|
// jQuery("#modal-lost-password").hide();
|
||||||
|
// jQuery('#modal-lost-password .w-form-done').hide();
|
||||||
|
// jQuery("#obnovitev-gesla").val('');
|
||||||
|
// }, 2000);
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
//
|
||||||
|
// // Napaka, če email ne obstaja v bazi
|
||||||
|
// jQuery('#modal-lost-password .w-form-fail').html('<div>' + val.text + '</div>').show();
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
var emailObnovitev = jQuery('#obnovitev-gesla').val();
|
// // AKtivacija izgubljenega gesla
|
||||||
var jezik = jQuery('#modal-lost-password [name="jezik"]').val();
|
// if (window.location.hash == '#aktivacija-gesla') {
|
||||||
|
// jQuery('#modal-lost-password-activate').show();
|
||||||
|
// }
|
||||||
|
|
||||||
if (emailObnovitev.length == 0 || emailObnovitev.length > 1 && (emailObnovitev.search('@') == -1 || emailObnovitev.indexOf('.') == -1)) {
|
// V datoteki login.js
|
||||||
jQuery('#error-lost-password').show();
|
// jQuery('#submit-lost-password-activation').on('click', function () {
|
||||||
|
// jQuery('.w-form-fail').hide();
|
||||||
return false;
|
// jQuery('.error').removeClass('error');
|
||||||
}
|
//
|
||||||
|
// var email = jQuery('#aktivacija-email').val();
|
||||||
// V kolikor je vse ok poljemo POST request, da preverimo v bazi
|
// var geslo = jQuery('#aktivacija-geslo').val();
|
||||||
jQuery.post('/frontend/api/api.php?action=reset_password', {
|
// var koda = '';
|
||||||
email: emailObnovitev,
|
// var jezik = jQuery('#modal-lost-password [name="jezik"]').val();
|
||||||
ajax: true,
|
//
|
||||||
jezik: jezik
|
// var results = new RegExp('[\?&]code=([^&#]*)').exec(window.location.href);
|
||||||
}).done(function (val) {
|
// if (results[1].length > 10)
|
||||||
val = JSON.parse(val);
|
// koda = results[1];
|
||||||
|
//
|
||||||
jQuery('#modal-lost-password .w-form-done').html('').hide();
|
// if (email.length == 0 || geslo.length == 0 || koda.length == 0) {
|
||||||
jQuery('#modal-lost-password .w-form-fail').hide();
|
// jQuery('#error-aktivacija-gesla').show();
|
||||||
|
//
|
||||||
if (val.type == 'success') {
|
// if (email.length == 0) {
|
||||||
jQuery('#modal-lost-password .w-form-done').html('<div>' + val.text + '</div>').show();
|
// jQuery('#aktivacija-email').addClass('error');
|
||||||
|
// }
|
||||||
// Če je bil email uspešno poslal potem okno zapremo po 5 sekundah
|
//
|
||||||
setTimeout(function () {
|
// if (geslo.length == 0) {
|
||||||
jQuery("#modal-lost-password").hide();
|
// jQuery('#aktivacija-geslo').addClass('error');
|
||||||
jQuery('#modal-lost-password .w-form-done').hide();
|
// }
|
||||||
jQuery("#obnovitev-gesla").val('');
|
//
|
||||||
}, 2000);
|
// return false;
|
||||||
|
// }
|
||||||
} else {
|
//
|
||||||
|
//
|
||||||
// Napaka, če email ne obstaja v bazi
|
// // V kolikor je vse ok poljemo POST request, da preverimo v bazi
|
||||||
jQuery('#modal-lost-password .w-form-fail').html('<div>' + val.text + '</div>').show();
|
// jQuery.post('/frontend/api/api.php?action=reset_password_activate', {
|
||||||
|
// email: email,
|
||||||
}
|
// pass: geslo,
|
||||||
});
|
// code: koda,
|
||||||
});
|
// ajax: true,
|
||||||
|
// lang: jezik
|
||||||
// AKtivacija izgubljenega gesla
|
// }).done(function (val) {
|
||||||
if (window.location.hash == '#aktivacija-gesla') {
|
// val = JSON.parse(val);
|
||||||
jQuery('#modal-lost-password-activate').show();
|
//
|
||||||
}
|
// jQuery('#error-aktivacija-gesla').removeClass('w-form-fail').removeClass('w-form-done').html('').hide();
|
||||||
jQuery('#submit-lost-password-activation').on('click', function () {
|
//
|
||||||
jQuery('.w-form-fail').hide();
|
// if (val.type == 'success') {
|
||||||
jQuery('.error').removeClass('error');
|
// jQuery('#error-aktivacija-gesla').addClass('w-form-done').html('<div>' + val.text + '</div>').show();
|
||||||
|
//
|
||||||
var email = jQuery('#aktivacija-email').val();
|
// // Če je bil email uspešno poslal potem okno zapremo po 5 sekundah
|
||||||
var geslo = jQuery('#aktivacija-geslo').val();
|
// setTimeout(function () {
|
||||||
var koda = '';
|
// window.location.href = val.action;
|
||||||
var jezik = jQuery('#modal-lost-password [name="jezik"]').val();
|
// }, 5000);
|
||||||
|
//
|
||||||
var results = new RegExp('[\?&]code=([^&#]*)').exec(window.location.href);
|
// } else {
|
||||||
if (results[1].length > 10)
|
//
|
||||||
koda = results[1];
|
// // Napaka, če email ne obstaja v bazi
|
||||||
|
// jQuery('#error-aktivacija-gesla').addClass('w-form-fail').html('<div>' + val.text + '</div>').show();
|
||||||
if (email.length == 0 || geslo.length == 0 || koda.length == 0) {
|
//
|
||||||
jQuery('#error-aktivacija-gesla').show();
|
// }
|
||||||
|
// });
|
||||||
if (email.length == 0) {
|
// });
|
||||||
jQuery('#aktivacija-email').addClass('error');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (geslo.length == 0) {
|
|
||||||
jQuery('#aktivacija-geslo').addClass('error');
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// V kolikor je vse ok poljemo POST request, da preverimo v bazi
|
|
||||||
jQuery.post('/frontend/api/api.php?action=reset_password_activate', {
|
|
||||||
email: email,
|
|
||||||
pass: geslo,
|
|
||||||
code: koda,
|
|
||||||
ajax: true,
|
|
||||||
lang: jezik
|
|
||||||
}).done(function (val) {
|
|
||||||
val = JSON.parse(val);
|
|
||||||
|
|
||||||
jQuery('#error-aktivacija-gesla').removeClass('w-form-fail').removeClass('w-form-done').html('').hide();
|
|
||||||
|
|
||||||
if (val.type == 'success') {
|
|
||||||
jQuery('#error-aktivacija-gesla').addClass('w-form-done').html('<div>' + val.text + '</div>').show();
|
|
||||||
|
|
||||||
// Če je bil email uspešno poslal potem okno zapremo po 5 sekundah
|
|
||||||
setTimeout(function () {
|
|
||||||
window.location.href = val.action;
|
|
||||||
}, 5000);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// Napaka, če email ne obstaja v bazi
|
|
||||||
jQuery('#error-aktivacija-gesla').addClass('w-form-fail').html('<div>' + val.text + '</div>').show();
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
//Prijava z ostalimi računi
|
//Prijava z ostalimi računi
|
||||||
jQuery('#agreelabel, #cutom-login-agree, .checkbox-agree').on('click', function () {
|
jQuery('#agreelabel, #cutom-login-agree, .checkbox-agree').on('click', function () {
|
||||||
|
@ -9,6 +9,7 @@ global-styling:
|
|||||||
# js/enka-default.js: {}
|
# js/enka-default.js: {}
|
||||||
# js/enka-21.js: {}
|
# js/enka-21.js: {}
|
||||||
js/script.js: {}
|
js/script.js: {}
|
||||||
|
js/login.js: {}
|
||||||
js/modernizr-custom.js: {}
|
js/modernizr-custom.js: {}
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -18,8 +18,8 @@ function pro1ka_preprocess_page(&$variables) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$variables['lang'] = $lang;
|
$variables['lang'] = $lang;
|
||||||
|
|
||||||
$variables['uporabnik'] = (!empty($_COOKIE['unam']) ? base64_decode($_COOKIE['unam']) : '');
|
$variables['uporabnik'] = (!empty($_COOKIE['unam']) ? base64_decode($_COOKIE['unam']) : '');
|
||||||
|
$variables['emailUporabnik'] = 'da'.(!empty($_COOKIE['uid']) ? base64_decode($_COOKIE['uid']) : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -124,18 +124,18 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
transition: 0.2s;
|
transition: 0.2s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $modra-hover;
|
background: $modra-hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.gumb-aai{
|
&.gumb-aai{
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
background: #e35205;
|
background: #e35205;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
|
|
||||||
&.login{
|
&.login{
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
@ -145,12 +145,12 @@
|
|||||||
span{
|
span{
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover{
|
&:hover{
|
||||||
background: #fa6c21;
|
background: #fa6c21;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 1.6rem;
|
height: 1.6rem;
|
||||||
width: 52px;
|
width: 52px;
|
||||||
@ -241,6 +241,12 @@
|
|||||||
.prijava.forma {
|
.prijava.forma {
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
.error-message {
|
||||||
|
background: #ff000024;
|
||||||
|
padding: 0.25rem 0.75rem;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.intro-modal{
|
.intro-modal{
|
||||||
|
@ -89,7 +89,7 @@ END HEADER #}
|
|||||||
{% if email_uporabnika %}
|
{% if email_uporabnika %}
|
||||||
<a href="/admin/survey" class="button-pricechart pcb1 w-button">Preizkusi brezplačno</a>
|
<a href="/admin/survey" class="button-pricechart pcb1 w-button">Preizkusi brezplačno</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/admin/survey" class="button-pricechart pcb1 w-button">Preizkusi brezplačno</a>
|
<a href="#" class="button-pricechart pcb1 w-button">Preizkusi brezplačno</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<div class="button-label">Preizkusite</div><img src="/tema1ka/svg/icons8-chevron-right.svg" loading="lazy" alt="" class="button-right-arrow">
|
<div class="button-label">Preizkusite</div><img src="/tema1ka/svg/icons8-chevron-right.svg" loading="lazy" alt="" class="button-right-arrow">
|
||||||
<div class="button-flyin main"></div>
|
<div class="button-flyin main"></div>
|
||||||
</a>
|
</a>
|
||||||
<a href="#" class="button secondary-button-white shrink w-inline-block">
|
<a href="/d/sl/cenik/zasebni-paketi/" class="button secondary-button-white shrink w-inline-block">
|
||||||
<div class="button-label">Vsi paketi</div><img src="/tema1ka/svg/icons8-chevron-right-bela.svg" loading="lazy" alt="" class="button-right-arrow">
|
<div class="button-label">Vsi paketi</div><img src="/tema1ka/svg/icons8-chevron-right-bela.svg" loading="lazy" alt="" class="button-right-arrow">
|
||||||
<div class="button-flyin"></div>
|
<div class="button-flyin"></div>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user