Fix image header URL in advert details, update CV access message, enhance image ratio alerts in profile edit, modify registration titles and agreement checkbox behavior.

This commit is contained in:
2025-06-11 00:25:57 +02:00
parent c2a11763fc
commit 603c10f251
11 changed files with 45 additions and 19 deletions

View File

@@ -496,7 +496,7 @@ class GlobelusFirms
return false;
$result = \front\factory\GlobelusFirms::advert_enable( $g_user['id'], \S::get( 'advert-id' ), $g_user['email'] );
\S::set_alert_prompt( 'Informacja', $result['msg'] );
// \S::set_alert_prompt( 'Informacja', $result['msg'] );
header( 'Location: /panel-pracodawcy/ogloszenia' );
exit;

View File

@@ -19,7 +19,7 @@ class GlobelusUser
public static function delete_account()
{
global $lang;
global $lang, $g_user;
if ( !\front\factory\Globelus::permissions_check( $g_user = \S::get_session( 'g_user' ), __CLASS__ . "\\" . __FUNCTION__ ) )
return false;
@@ -27,7 +27,11 @@ class GlobelusUser
if ( \front\factory\GlobelusUser::delete_account( $g_user['id'] ) )
\S::set_alert_prompt( 'Informacja', $lang[ 'usuwanie-konta-email' ] );
header( 'Location: /panel-kandydata/profil' );
if ( $g_user['type'] )
header( 'Location: /panel-pracodawcy/profil' );
else
header( 'Location: /panel-kandydata/profil' );
exit;
}

View File

@@ -991,7 +991,7 @@ class GlobelusFirms
if ( $mdb -> get( 'globelus_adverts', 'old', [ 'id' => $advert_id ] ) )
{
$mdb->update('globelus_adverts', [ 'old' => 0, 'active_to' => date( 'Y-m-d', strtotime('+' . $globelus_settings['ogloszenie-ilosc-dni-waznosci'] . ' days', time())), 'date_add' => date( 'Y-m-d H:i:s' ) ], [ 'id' => $advert_id ]);
$mdb->update('globelus_adverts', [ 'old' => 0, 'active_to' => date( 'Y-m-d', strtotime('+' . $globelus_settings['ogloszenie-ilosc-dni-waznosci'] . ' days', time())), 'date_add' => date( 'Y-m-d H:i:s' ), 'last_refresh' => date( 'Y-m-d H:i:s' ) ], [ 'id' => $advert_id ]);
}
return [

View File

@@ -3370,6 +3370,16 @@ div.form--aplication-link {
transform: translate(-50%, -50%);
padding: 20px 60px;
font-size: 22px;
@media (max-width: 991px) {
display: none !important;
}
}
}
.aplication-link {
@media (max-width: 991px) {
display: none !important;
}
}
@@ -3724,7 +3734,8 @@ div.form--aplication-link {
}
&._single {
grid-template-columns: 600px;
grid-template-columns: 1fr;
max-width: 600px;
margin: 30px auto;
justify-content: center;
}
@@ -3879,3 +3890,14 @@ div.form--aplication-link {
.mt25 {
margin-top: 25px !important;
}
#user-panel a.btn-danger {
display: inline-flex;
height: 25px;
align-items: center;
justify-content: center;
color: #FFF;
background: $cRed;
width: 25px;
border-radius: 50%;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -159,12 +159,12 @@
</div>
</div>
<?
$img_header_url = \front\factory\GlobelusFirms::img_header_url( $this -> g_user['id'] );
$img_header_url = \front\factory\GlobelusFirms::img_header_url( $this -> advert['user_id'] );
$advert_add_img_top = \front\factory\GlobelusFirms::advert_add_img_top_url( $this -> advert['id'] );
if ( file_exists( $advert_add_img_top ) ):
echo '<div class="image_header"><img src="/advert_add_img_top/' . $this->advert['id'] . '/'. \S::get_token() . '"></div>';
elseif ( file_exists( $img_header_url ) ):
echo '<div class="image_header"><img src="/img_header/' . $this->g_user['id'] . '/'. \S::get_token() . '"></div>';
echo '<div class="image_header"><img src="/img_header/' . $this -> advert['user_id'] . '/'. \S::get_token() . '"></div>';
endif;
?>
<div class="content">

View File

@@ -156,7 +156,7 @@
<div class="row">
<div class="col-12">
<form method="POST" action="/globelusCv/activate_access/" enctype="multipart/form-data" id="cv-access">
<p>Obecnie nie posiadasz wykupionego dostępu do bazy kandydatów.<br/>Dostęp na <b>30 dni</b> to koszt <b><?= $this -> gsettings['pkt-dostep-baza-kandydatow'];?></b> punktów.</p>
<p>Obecnie nie posiadasz wykupionego dostępu do bazy kandydatów.<br/>Dostęp na <b>30 dni</b> to koszt <b>89</b> punktów.</p>
<p class="text-red" style="font-weight: 600">Wybierz 3 kategorie i aktywuj dostęp.</p>
<div class="row">
<?

View File

@@ -405,6 +405,7 @@
if (headerInput && headerInput.files && headerInput.files.length) {
imageChecks.push(getImageSize(headerInput.files[0]).then(size => {
if (!isValidRatio(size)) {
showAlert( 'Zdjęcie nad ogłoszeniem ma nieprawidłowe proporcje. Proporcje obrazu muszą mieścić się w przedziale 2.66:1 i 8:1.' );
throw new Error('header');
}
}));
@@ -413,6 +414,7 @@
if (bottomInput && bottomInput.files && bottomInput.files.length) {
imageChecks.push(getImageSize(bottomInput.files[0]).then(size => {
if (!isValidRatio(size)) {
showAlert( 'Zdjęcie pod ogłoszeniem ma nieprawidłowe proporcje. Proporcje obrazu muszą mieścić się w przedziale 2.66:1 i 8:1.' );
throw new Error('bottom');
}
}));
@@ -422,7 +424,7 @@
const hasError = results.some(r => r.status === 'rejected');
if (hasError) {
showAlert( 'Wybrany obraz jest nieprawidłowy. Propoce obrazu muszą mieścić się w przedziale 2.66:1 i 8:1.' );
// showAlert( 'Wybrany obraz jest nieprawidłowy. Propocje obrazu muszą mieścić się w przedziale 2.66:1 i 8:1.' );
return;
}

View File

@@ -22,9 +22,7 @@ if ( !$accessToken )
</div>
</div>
<div class="mini-box">
<div class="title">
<?= $lang['konto-kandydata'];?>
</div>
<div class="title">rejestracja jako kandydat</div>
<div class="container-fluid">
<div class="row">
<div class="col-12">
@@ -65,7 +63,7 @@ if ( !$accessToken )
</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
<input type="checkbox" id="agremment-marketing"> Wyrażam zgodę na kontakt mailowy i/lub telefoniczny ze strony globelus.pl
</div>
</div>
<div class="form-group row">
@@ -89,7 +87,7 @@ if ( !$accessToken )
var hash = document.URL.substr( document.URL.indexOf( '#' ) + 1 );
if ( hash === 'pracodawca' )
{
$( '#user-register .title' ).html( '<?= $lang['konto-pracodawcy'];?>' );
$( '#user-register .title' ).html( 'rejestracja jako pracodawca' );
$( '#f-user-register .agremment-profile' ).hide();
$( '#f-user-register #type' ).val( 1 );
$( '#f-user-register #agremment-profile' ).removeAttr( 'required' );
@@ -99,7 +97,7 @@ if ( !$accessToken )
{
if ( $( this ).hasClass( 'btn-firm' ) )
{
$( '#user-register .title' ).html( '<?= $lang['konto-pracodawcy'];?>' );
$( '#user-register .title' ).html( 'rejestracja jako pracodawca' );
$( '#f-user-register .agremment-profile' ).hide();
$( '#f-user-register #type' ).val( 1 );
$( '#f-user-register #agremment-profile' ).removeAttr( 'required' );
@@ -115,7 +113,7 @@ if ( !$accessToken )
if ( $( this ).hasClass( 'btn-user' ) )
{
$( '#user-register .title' ).html( '<?= $lang['konto-kandydata'];?>' );
$( '#user-register .title' ).html( 'rejestracja jako kandydat' );
$( '#f-user-register .agremment-profile' ).show();
$( '#f-user-register #type' ).val( 0 );

View File

@@ -310,7 +310,7 @@
</div>
<div class="form-group row agremment-marketing">
<div class="col-12">
<input type="checkbox" id="agremment-marketing" name="agremment_marketing" required > Wyrażam zgodę na kontakt mailowy i/lub telefoniczny ze strony globelus.pl
<input type="checkbox" id="agremment-marketing" name="agremment_marketing" > Wyrażam zgodę na kontakt mailowy i/lub telefoniczny ze strony globelus.pl
</div>
</div>
<div class="row">