first commit
This commit is contained in:
107
templates_user/globelus/user/login.php
Normal file
107
templates_user/globelus/user/login.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?
|
||||
global $gClient, $lang, $accessToken, $helper, $redirectURL, $fbPermissions;
|
||||
if ( !$gClient -> getAccessToken() )
|
||||
{
|
||||
$authUrl = $gClient -> createAuthUrl();
|
||||
$btn_google = '<a href="' . filter_var( $authUrl, FILTER_SANITIZE_URL ).'" class="google-login">' . ucfirst( $lang['zaloguj-sie'] ) . '</a>';
|
||||
}
|
||||
|
||||
if ( !$accessToken )
|
||||
{
|
||||
$loginURL = $helper -> getLoginUrl( $redirectURL, $fbPermissions );
|
||||
$btn_facebook = '<a href="' . htmlspecialchars( $loginURL ).'" class="facebook-login">' . ucfirst( $lang['zaloguj-sie'] ) . '</a>';
|
||||
}
|
||||
?>
|
||||
<div id="user-login">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-5">
|
||||
<div id="promo">
|
||||
<h2>Kandydacie warto być u nas zalogowanym!</h2>
|
||||
<div class="row no-gutters mb15">
|
||||
<div class="col-2 col-sm-2 col-md-1 col-lg-2">
|
||||
<i class="far fa-clock"></i>
|
||||
</div>
|
||||
<div class="col-10 col-sm-10 col-md-11 col-lg-10">
|
||||
<div class='text'>
|
||||
<strong>Szybkie aplikowanie na oferty</strong><br />
|
||||
<small>(formularz aplikacyjny automatycznie uzupełniony Twoimi danymi oraz cv)</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters mb15">
|
||||
<div class="col-2 col-sm-2 col-md-1 col-lg-2">
|
||||
<i class="fas fa-archive"></i>
|
||||
</div>
|
||||
<div class="col-10 col-sm-10 col-md-11 col-lg-10">
|
||||
<div class='text'>
|
||||
<strong>Archiwum aplikacji</strong><br />
|
||||
<small>(historia wysłanych aplikacji zawsze pod ręką)</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters mb15">
|
||||
<div class="col-2 col-sm-2 col-md-1 col-lg-2">
|
||||
<i class="fas fa-star"></i>
|
||||
</div>
|
||||
<div class="col-10 col-sm-10 col-md-11 col-lg-10">
|
||||
<div class='text'>
|
||||
<strong>Obserwowane aplikacje</strong><br />
|
||||
<small>(interesujące aplikacje w jednym miejscu)</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters mb15">
|
||||
<div class="col-2 col-sm-2 col-md-1 col-lg-2">
|
||||
<i class="far fa-address-card"></i>
|
||||
</div>
|
||||
<div class="col-10 col-sm-10 col-md-11 col-lg-10">
|
||||
<div class='text'>
|
||||
<strong>Dostęp do pełnych danych kontaktowych pracodawców</strong><br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-7">
|
||||
<div class="mini-box">
|
||||
<div class="title">
|
||||
<?= ucfirst( $lang['logowanie'] );?>
|
||||
</div>
|
||||
<div class="subtitle">
|
||||
<?= ucfirst( $lang['logowanie-podytul'] );?>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content user">
|
||||
<form method="POST" action="/globelusUser/signin/" id="f-user-login">
|
||||
<div class="form-group row">
|
||||
<label form="email" class="col-12 col-sm-4"><?= ucfirst( $lang['email'] );?>:</label>
|
||||
<div class="col-12 col-sm-8">
|
||||
<input type="email" name="email" required id="email" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label form="password" class="col-12 col-sm-4"><?= ucfirst( $lang['haslo'] );?>:</label>
|
||||
<div class="col-12 col-sm-8">
|
||||
<input type="password" name="password" required id="password" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12 col-sm-8 offset-sm-4">
|
||||
<input type="submit" value="<?= ucfirst( $lang['zaloguj-sie'] );?>" class="btn btn-success">
|
||||
<? $btn_google . $btn_facebook;?>
|
||||
<div class="clearfix"></div>
|
||||
<span><?= $lang['nie-pamietasz-hasla'];?> <a href="/odzyskiwanie-hasla"><?= ucfirst( $lang['nowe-haslo'] );?></a></span><br />
|
||||
<span><big><?= $lang['nie-masz-konta'];?> <a href="/rejestracja"><?= ucfirst( $lang['zarejestruj-sie'] );?></a>. Rejestracja zarówno dla pracodawców jak i kandydatów jest całkowicie <strong>darmowa</strong>.</big></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
30
templates_user/globelus/user/recover-password.php
Normal file
30
templates_user/globelus/user/recover-password.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<? global $lang;?>
|
||||
<div id="user-login">
|
||||
<div class="mini-box">
|
||||
<div class="title">
|
||||
<?= ucfirst( $lang['odzyskiwanie-hasla'] );?>
|
||||
</div>
|
||||
<div class="subtitle"><?= ucfirst( $lang['odzyskiwanie-hasla-podtytul'] );?></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content user">
|
||||
<form method="POST" action="/globelusUser/send_email_password_recovery/">
|
||||
<div class="form-group row">
|
||||
<label form="email" class="col-12 col-sm-4"><?= ucfirst( $lang['email'] );?>:</label>
|
||||
<div class="col-12 col-sm-8">
|
||||
<input type="email" name="email" required id="email" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12 col-sm-8 offset-sm-4">
|
||||
<input type="submit" value="<?= ucfirst( $lang['wyslij'] );?>" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
237
templates_user/globelus/user/register.php
Normal file
237
templates_user/globelus/user/register.php
Normal file
@@ -0,0 +1,237 @@
|
||||
<?
|
||||
global $gClient, $lang, $accessToken, $helper, $redirectURL, $fbPermissions;
|
||||
if ( !$gClient -> getAccessToken() )
|
||||
{
|
||||
$authUrl = $gClient -> createAuthUrl();
|
||||
$btn_google = '<a href="' . str_replace( 'g_register%3D0', 'g_register%3D1', filter_var( $authUrl, FILTER_SANITIZE_URL ) ) . '" class="google-login">' . ucfirst( $lang['zarejestruj-sie'] ) . '</a>';
|
||||
}
|
||||
|
||||
if ( !$accessToken )
|
||||
{
|
||||
$loginURL = $helper -> getLoginUrl( $redirectURL, $fbPermissions );
|
||||
$btn_facebook = '<a href="' . str_replace( 'f_register%3D0', 'f_register%3D1', htmlspecialchars( $loginURL ) ) . '" class="facebook-login">' . ucfirst( $lang['zarejestruj-sie'] ) . '</a>';
|
||||
}
|
||||
?>
|
||||
<div id="user-register">
|
||||
<div class="mini-buttons" id="buttons">
|
||||
<div class="btn btn-user">
|
||||
<?= $lang['rejestracja-jako-kandydat'];?>
|
||||
</div>
|
||||
<div class="btn btn-firm">
|
||||
<?= $lang['rejestracja-jako-pracodawca'];?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mini-box">
|
||||
<div class="title">
|
||||
<?= $lang['konto-kandydata'];?>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="content user">
|
||||
<form method="POST" action="/" id="f-user-register">
|
||||
<input type="hidden" id="type" name="type" value="0">
|
||||
<div class="form-group row">
|
||||
<label form="email" class="col-12 col-sm-4"><?= ucfirst( $lang['email'] );?>:</label>
|
||||
<div class="col-12 col-sm-8">
|
||||
<input type="email" required id="email" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label form="password" class="col-12 col-sm-4"><?= ucfirst( $lang['haslo'] );?> (<?= $lang['min'];?> 6 <?= $lang['znakow'];?>):</label>
|
||||
<div class="col-12 col-sm-8">
|
||||
<input type="password" required id="password" pattern="^\S{6,}$" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label form="password" class="col-12 col-sm-4"><?= ucfirst( $lang['powtorz-haslo'] );?>:</label>
|
||||
<div class="col-12 col-sm-8">
|
||||
<input type="password" required id="password-repeat" pattern="^\S{6,}$" class="form-control" oninput="check_match(this)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row agremment">
|
||||
<div class="col-12 col-sm-8 offset-sm-4">
|
||||
<input type="checkbox" required id="agremment">
|
||||
<?
|
||||
$text = str_replace( '[LINK-REGULAMIN]', '<a href="/regulamin">' . $lang['regulamin'] . '</a>', $lang['rejestracja-akceptacja-regulaminu'] );
|
||||
echo $text = str_replace( '[LINK-POLITYKA-PRYWATNOSCI]', '<a href="/polityka-prywatnosci">' . $lang['polityke-prywatnosci'] . '</a>', $text );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row agremment-profile">
|
||||
<div class="col-12 col-sm-8 offset-sm-4">
|
||||
<input type="checkbox" required id="agremment-profile"> <?= $lang['rejestracja-zgoda-na-wyswietlenie-profilu'];?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row agremment-marketing">
|
||||
<div class="col-12 col-sm-8 offset-sm-4">
|
||||
<input type="checkbox" required id="agremment-marketing"> Wyrażam zgodę na kontakt mailowy i/lub telefoniczny ze strony globelus.pl
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12 col-sm-8 offset-sm-4 mt20">
|
||||
<input type="submit" value="<?= ucfirst( $lang['zarejestruj-sie'] );?>" class="btn btn-success">
|
||||
<? $btn_google . $btn_facebook;?>
|
||||
<div class="clearfix"></div>
|
||||
<span><?= $lang['masz-juz-konto'];?> <a href="/logowanie"><?= ucfirst( $lang['zaloguj-sie'] );?></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script class="footer" type='text/javascript'>
|
||||
$( function()
|
||||
{
|
||||
var hash = document.URL.substr( document.URL.indexOf( '#' ) + 1 );
|
||||
if ( hash === 'pracodawca' )
|
||||
{
|
||||
$( '#user-register .title' ).html( '<?= $lang['konto-pracodawcy'];?>' );
|
||||
$( '#f-user-register .agremment-profile' ).hide();
|
||||
$( '#f-user-register #type' ).val( 1 );
|
||||
$( '#f-user-register #agremment-profile' ).removeAttr( 'required' );
|
||||
}
|
||||
|
||||
$( 'body' ).on( click_event, '#user-register #buttons .btn', function()
|
||||
{
|
||||
if ( $( this ).hasClass( 'btn-firm' ) )
|
||||
{
|
||||
$( '#user-register .title' ).html( '<?= $lang['konto-pracodawcy'];?>' );
|
||||
$( '#f-user-register .agremment-profile' ).hide();
|
||||
$( '#f-user-register #type' ).val( 1 );
|
||||
$( '#f-user-register #agremment-profile' ).removeAttr( 'required' );
|
||||
|
||||
var url = $( '.google-login' ).attr( 'href' ).toString();
|
||||
url = url.replace( 'g_type%3D0', 'g_type%3D1' );
|
||||
$( '.google-login' ).attr( 'href', url );
|
||||
|
||||
var url_fb = $( '.facebook-login' ).attr( 'href' ).toString();
|
||||
url_fb = url_fb.replace( 'f_type%3D0', 'f_type%3D1' );
|
||||
$( '.facebook-login' ).attr( 'href', url_fb );
|
||||
}
|
||||
|
||||
if ( $( this ).hasClass( 'btn-user' ) )
|
||||
{
|
||||
$( '#user-register .title' ).html( '<?= $lang['konto-kandydata'];?>' );
|
||||
$( '#f-user-register .agremment-profile' ).show();
|
||||
$( '#f-user-register #type' ).val( 0 );
|
||||
|
||||
$( '#f-user-register #agremment-profile' ).attr( 'required', 'required' );
|
||||
var url = $( '.google-login' ).attr( 'href' );
|
||||
url = url.replace( 'g_type%3D1', 'g_type%3D0' );
|
||||
$( '.google-login' ).attr( 'href', url );
|
||||
|
||||
var url_fb = $( '.facebook-login' ).attr( 'href' ).toString();
|
||||
url_fb = url_fb.replace( 'f_type%3D1', 'f_type%3D0' );
|
||||
$( '.facebook-login' ).attr( 'href', url_fb );
|
||||
}
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'submit', '#f-user-register', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/globelusUser/signup/',
|
||||
data:
|
||||
{
|
||||
email: $( '#f-user-register #email' ).val(),
|
||||
password: $( '#f-user-register #password' ).val(),
|
||||
type: $( '#f-user-register #type' ).val(),
|
||||
agremment_profile: $( '#f-user-register #agremment-profile' ).val(),
|
||||
agremment_marketing: $( '#f-user-register #agremment-marketing' ).val()
|
||||
},
|
||||
beforeSend: function() {
|
||||
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status == 'bad2' )
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['informacja'] );?>',
|
||||
icon: 'fa fa-exclamation',
|
||||
content: response.msg,
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'large',
|
||||
theme: 'modern',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: 'Zaloguj się',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {
|
||||
document.location.href = '/logowanie';
|
||||
}
|
||||
}
|
||||
},
|
||||
onClose: function ()
|
||||
{
|
||||
if ( response.status === 'ok' )
|
||||
document.location.href = '/logowanie';
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['informacja'] );?>',
|
||||
icon: 'fa fa-exclamation',
|
||||
content: response.msg,
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'large',
|
||||
theme: 'modern',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
},
|
||||
onClose: function ()
|
||||
{
|
||||
if ( response.status === 'ok' )
|
||||
document.location.href = '/logowanie';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function check_match(input)
|
||||
{
|
||||
if ( input.value !== document.getElementById( 'password' ).value )
|
||||
input.setCustomValidity( '<?= $lang['podane-hasla-sa-rozne' ];?>');
|
||||
else
|
||||
input.setCustomValidity('');
|
||||
}
|
||||
</script>
|
||||
21
templates_user/globelus/user/user-mini-panel.php
Normal file
21
templates_user/globelus/user/user-mini-panel.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<? global $lang;?>
|
||||
<? if ( !$this -> g_user ):?>
|
||||
<a href="/rejestracja" id="sign-up">
|
||||
<?= $lang['zarejestruj-sie'];?>
|
||||
</a>
|
||||
<a href="/logowanie" id="sign-in">
|
||||
<?= $lang['zaloguj-sie'];?>
|
||||
</a>
|
||||
<? else:?>
|
||||
<a href="/globelusUser/logout/" id="logout">
|
||||
<?= $lang['wyloguj-sie'];?>
|
||||
</a>
|
||||
<a href="<?= $this -> g_user['type'] ? '/panel-pracodawcy/profil' : '/panel-kandydata/profil';?>" id="user-panel">
|
||||
<?= $this -> g_user['type'] ? $lang['panel-pracodawcy'] : $lang['panel-kandydata'];?>
|
||||
</a>
|
||||
<? if ( $this -> g_user['type'] and is_array( $this -> g_user['categories'] ) and count( $this -> g_user['categories'] ) ):?>
|
||||
<div id="mini-menu">
|
||||
<a href="/baza-cv"><i class="fa fa-file-text"></i>Baza kandydatów</a>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endif;?>
|
||||
Reference in New Issue
Block a user