Files
globelus.pl/templates_user/globelus/user/new-password.php
Jacek Pyziak 905c0f0d89 Add candidate and employer templates, application form, and new password functionality
- Created 'dla-kandydata.php' template for candidates with job offers and registration options.
- Developed 'dla-pracodawcy.php' template for employers detailing how Globelus works and registration for new employers.
- Implemented 'advert-apply.php' for job applications, including form validation and file upload for CVs.
- Added 'new-password.php' for users to set a new password with validation for password strength and matching.
2025-05-24 11:51:42 +02:00

84 lines
2.8 KiB
PHP

<? global $lang;?>
<div id="user-login">
<div class="mini-box">
<div class="title">Ustaw nowe hasło</div>
<div class="subtitle">Wpisz nowe hasło do Swojego konta (min. 6 znaków)</div>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="content user">
<form method="POST" action="/globelusUser/save_new_password/">
<input type="hidden" name="hash" value="<?= $this -> hash;?>">
<div class="form-group row">
<label form="password" class="col-12 col-sm-4">Hasło:</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">
<label form="password_retype" class="col-12 col-sm-4">Powtórz hasło:</label>
<div class="col-12 col-sm-8">
<input type="password" name="password_retype" required id="password_retype" class="form-control">
</div>
</div>
<div class="form-group row">
<div class="col-12 col-sm-8 offset-sm-4">
<input type="submit" value="Zatwierdź" class="btn btn-success">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$( function() {
$( 'body' ).on( 'click', '#user-login input[type="submit"]', function( e ) {
e.preventDefault();
var form = $( this ).closest( 'form' );
var password = form.find( '#password' ).val();
var password_retype = form.find( '#password_retype' ).val();
var alert_text = '';
if ( password != password_retype ) {
var alert_text = 'Hasła nie są takie same!';
}
if ( password.length < 6 ) {
var alert_text = 'Hasło musi mieć min. 6 znaków!';
}
if ( !form.find( '#password' ).val() ) {
var alert_text = 'Hasło nie może być puste!';
}
if ( alert_text ) {
$.alert({
title: '<?= ucfirst( $lang['informacja'] );?>',
icon: 'fa fa-exclamation',
content: alert_text,
type: 'blue',
closeIcon: true,
closeIconClass: 'fa fa-close',
typeAnimated: true,
animation: 'opacity',
autoClose: 'confirm|10000',
columnClass: 'large',
theme: 'modern',
buttons: {
confirm: {
text: 'Zamknij',
btnClass: 'btn-blue',
keys: ['enter'],
action: function() {
}
}
},
onClose: function () {
}
});
return false;
}
form.submit();
} );
});
</script>