{% extends "Frontend/base-recrutement.html.twig" %}
{% block body %}
<div id="presentationCadre">
{% if poste_title %}
{% block title %}<title>Recrutements - {{ poste_title }}</title>{% endblock %}
<div class="row mt-4 justify-content-end">
<div class="col-2 pt-2">
<a href="{{ path('frontend_candidat') }}" class="btn btn-warning">
<i class="fa fa-home"></i>
Accueil
</a>
</div>
</div>
{% endif %}
{% if parameters %}
<div class="row">
<div class="col">
{{ parameters.slogan | raw }}
</div>
</div>
<div class="row">
<div class="col">
{{ parameters.abstract | raw }}
</div>
</div>
{% endif %}
<div class="row mt-6">
<div class="col">
{% if is_spontane %}
<p>Cette plateforme vous permet de proposer votre <b> candidature spontanée </b></p>
<div id="posteDescription">{{ poste_description | raw}}</div>
{% if poste_title %}
<p>Pour déposer votre candidature, vous devez:
<ol>
<li>Créer un compte sur cette plateforme si ce n'est pas déjà le cas.</li>
<li>Déposer votre cv et votre lettre de motivation sur votre espace personnel dans la rubrique <b>candidature spontanée</b>.</li>
</ol>
</p>
{% endif %}
{% elseif poste_title%}
<p>Cette plateforme vous permet de proposer votre candidature à {{ site_name }} pour le poste de : </p>
<div id="posteTitle">{{ poste_title }}</div>
<div id="posteDescription">{{ poste_description | raw}}</div>
<div id="posteFiche">{% if poste_fiche %} <a target="_blank" class="btn btn-primary" href="{{ path('frontend_download_fiche_poste',{'id':poste_fiche.id}) }}"><i class="fa fa-eye"></i> Consulter la fiche du poste</a> {% endif %}
{% if poste_annexe %} <a target="_blank" class="btn btn-info" href="{{ path('frontend_download_fiche_poste',{'id':poste_annexe.id}) }}"><i class="fa fa-eye"></i> Consulter la liste des pièces à joindre</a> {% endif %}</div>
<p>Pour candidater, vous devez:
<ol>
<li>Créer un compte sur ce site si ce n'est pas déjà le cas.</li>
<li>Déposer l'ensemble de votre dossier sur votre espace personnel.</li>
</ol>
</p>
{% else %}
{% endif %}
</div>
</div>
<div id="msg-success" class="row" {% if message==""%} style="display: none" {% endif %}>
<div class="col">
<div id="msg-success" class="alert alert-{{message_type}}"><i class="fa fa-info-circle"></i>{{ message }}</div>
</div>
</div>
<div class="row mt-4">
<div id="login" class="col-sm-6 mb-4">
{% if not private %}
<div class="row">
{% if poste_title %}
<legend class="border-bottom">Vous avez déjà un compte </legend>
{% else %}
<legend class="border-bottom"> Accéder à votre espace </legend>
{% endif %}
<form class="form-horizontal" action="{{ path('frontend_candidat_login_check') }}" method="post">
{% if error %}
<div id="msg-error" class="alert alert-danger">
<i class="fa fa-info-circle"></i>
{% if error.message=='Bad credentials.' %}Identifiant et/ou mot de passe éronné.
{% elseif error.message=='User account is disabled.' %} Vous n'avez pas activé votre compte via le premier email que vous avez reçu.
{% elseif error.message=='The presented password cannot be empty.'%}Le mot de passe ne peut être vide.
{% elseif error.message=='The presented password is invalid.'%}Le mot de passe est invalide.
{% else %}{{error.message}}{% endif %}
</div>
{% endif %}
<div class="row mb-2">
<label class="col-sm-5" for="username">Identifiant :</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="username" name="_username" placeholder="adresse de messagerie" value="{{ last_username }}" />
</div>
</div>
<div class="row mb-2">
<label class="col-sm-5" for="password">Mot de passe :</label>
<div class="col-sm-7">
<input type="password" class="form-control" id="password" name="_password" />
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<button type="submit" class="btn btn-success"> <span class="fa fa-sign-in-alt" aria-hidden="true"></span> Connexion</button>
</div>
</div>
</form>
<div class="passwordLink">
<a id="pwdLink" data-bs-toggle="modal" data-target="#msgPwdOublie"><i class="fa fa-user-circle"> </i> Mot de passe oublié ?</a><br>
<a id="activLink" data-bs-toggle="modal" data-target="#msgActivSend"><i class="fa fa-user-circle"> </i> Vous n'avez pas reçu le mail d'activation ?</a>
</div>
</div>
{% endif %}
<div id="login_cas" class="row {% if not private %}mt-4{% endif %}">
<legend class="border-bottom">J'ai un compte universitaire </legend>
<div class="col text-center">
<a class="btn btn-success" href="{{ path('frontend_candidat_interne_view') }}"><i class="fa fa-sign-in-alt"></i> Connexion avec mon compte <br> {{ site_name }}</a>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
{% if poste_title %}
{% if not private %}
<legend>Créer votre compte</legend>
<form id="form_create" class="form-horizontal" action="{{ path('frontend_candidat_poste', {'poste': poste})}}" method="post">
{{ form_errors(form) }}
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.nom.vars.id }}">Nom :</label>
<div class="col-sm-8">
{{ form_widget(form.nom) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.prenom.vars.id }}">Prénom :</label>
<div class="col-sm-8">
{{ form_widget(form.prenom) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.genre.vars.id }}">Genre :</label>
<div class="col-sm-8">
{{ form_widget(form.genre) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-5" for="{{ form.date_naissance.vars.id }}">Date de naissance :</label>
<div class="col-sm-7">
{{ form_widget(form.date_naissance) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-5" for="{{ form.lieu_naissance.vars.id }}">Lieu de naissance :</label>
<div class="col-sm-7">
{{ form_widget(form.lieu_naissance) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.tel.vars.id }}">Tel :</label>
<div class="col-sm-8">
{{ form_widget(form.tel) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.email.vars.id }}">Courriel :</label>
<div class="col-sm-8">
{{ form_widget(form.email) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.adresse.vars.id }}">Adresse :</label>
<div class="col-sm-8">
{{ form_widget(form.adresse) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.cp.vars.id }}">CP :</label>
<div class="col-sm-8">
{{ form_widget(form.cp) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.ville.vars.id }}">Ville :</label>
<div class="col-sm-8">
{{ form_widget(form.ville) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.pays.vars.id }}">Pays :</label>
<div class="col-sm-8">
{{ form_widget(form.pays) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.password.password.vars.id }}">Mot de passe :</label>
<div class="col-sm-8">
{{ form_widget(form.password.password) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.password.confirmation.vars.id }}">Confirmation :</label>
<div class="col-sm-8">
{{ form_widget(form.password.confirmation) }}
</div>
</div>
<div class="row mb-2">
<label class="control-label col-sm-4" for="{{ form.terms.vars.id }}">Termes :</label>
<div class="col-sm-1 terms">
{{ form_widget(form.terms) }}
</div>
<div class="col-sm-offset-7">
</div>
</div>
{{ form_rest(form) }}
<div class="row">
<div class="col-md-12 text-center">
<button type="submit" class="btn btn-success"><i class="fa fa-check-circle" ></i> Valider</button>
</div>
</div>
</form>
{% else %}
<div class="alert alert-warning">
<i class="fa fa-info-circle"></i> Ce poste est réservé aux personnels de l'établissement.
</div>
{% endif %}
{% else %}
<legend class="border-bottom">Candidater <a class="allPostes" href="{{ path('frontend_postes') }}"><i class="fa fa-hand-point-right"> </i> Postes</a></legend>
<ul id="cats" class="nav nav-tabs" role="tablist">
{% for cat in cats %}
<li class="nav-item" role="presentation">
<button id="cat-tab-{{cat.id}}" class="nav-link {% if loop.first %}active{% endif %}" aria-selected="{% if loop.first %}true{% else %}false{% endif %}" aria-controls="cat-{{cat.id}}" data-bs-toggle="tab" data-bs-target="#cat-{{cat.id}}">{{cat.name}}</button>
</li>
{% endfor %}
</ul>
<div id="catsContent" class="tab-content">
{% for cat in cats %}
{% set postes = attribute(postesByCategory, cat.id) %}
<div id="cat-{{cat.id}}" class="tab-pane fade {% if loop.first %}show active{% endif %}" aria-labelledby="cat-tab-{{cat.id}}">
{% include 'Frontend/Candidat/carousel.html.twig' %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
<div class="row mt-4">
<legend class="border-bottom">Candidature spontanéee </legend>
<div class="col">
<p>Cette plateforme vous permet de proposer votre candidature pour un poste en cours de parution ou par le biais d'une <a href="{{ path("frontend_candidat_poste",{"poste":"CAND_SPONT"}) }}"> candidature spontanée</a>. </p>
</div>
</div>
</div>
<div class="modal fade" id="msgPwdOublie" tabindex="-1" aria-labelledby="msgPwdOublieModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="msgPwdOublieModalLabel">Générer un nouveau mot de passe</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-3">
<label for="user_login">Identifiant : </label>
</div>
<div class="col-9">
<input id="user_login" placeholder="adresse de messagerie" class="form-control" type="text" value="" name="user_login">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><i class="fa fa-times-circle"></i> Fermer</button>
<button id="submitPwd" class="btn btn-primary"> <i class="fa fa-paper-plane"></i> Générer un mot de passe</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="msgActivSend" tabindex="-1" aria-labelledby="msgActivSendModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="msgActivSendModalLabel">Renvoyer le courriel d'activation</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-3">
<label for="user_login_activ">Identifiant : </label>
</div>
<div class="col-9">
<input id="user_login_activ" placeholder="adresse de messagerie" class="form-control" type="text" value="" name="user_login_activ">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><i class="fa fa-times-circle"></i> Fermer</button>
<button id="submitActivSend" class="btn btn-primary"> <i class="fa fa-paper-plane"></i> Envoyer le courriel</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="msgTermes" tabindex="-1" aria-labelledby="termesModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="termesModalLabel">Termes et conditions d'utilisation</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{% if is_spontane %}
{% include 'Frontend/Candidat/Termes/termes-cand_spont.html.twig' %}
{% else %}
{% include 'Frontend/Candidat/Termes/termes.html.twig' %}
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><i class="fa fa-times-circle"></i> Fermer</button>
<button id="validTermes" class="btn btn-primary"><i class="fa fa-user-check"></i> J'accepte</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
var msgTermes = new bootstrap.Modal(document.getElementById('msgTermes'));
var msgPwdOublie = new bootstrap.Modal(document.getElementById('msgPwdOublie'));
var msgActivSend= new bootstrap.Modal(document.getElementById('msgActivSend'));
$("#rec_candidat_terms").on('click', function (event){
if(this.checked)
msgTermes.show();
});
$("#activLink").on('click', function (event){
event.preventDefault();
msgActivSend.show();
});
$("#submitActivSend").on('click', function (event){
event.preventDefault();
msgActivSend.hide();
var objData = {};
var url = $(this.element).attr('data-url');
objData = { mail: $("#user_login_activ").val() };
if(validateEmail($("#user_login_activ").val()))
{
$.ajax({
url: '{{ path('candidat_sendMailActivateAccount') }}',
dataType: "json",
data : objData,
type: 'POST',
success: function (data)
{
if(data.success==1)
{
$("#msg-success").show();
$("#msg-success").find(".alert").html(data.message);
$("#msg-success").find(".alert").removeClass('alert-');
$("#msg-success").find(".alert").addClass('alert-info');
}
else
{
$("#msg-error").show();
$("#msg-error").html(data.message);
}
}
});
}
});
$("#pwdLink").on('click', function (event){
event.preventDefault();
msgPwdOublie.show();
});
$("#submitPwd").on('click', function (event){
event.preventDefault();
msgPwdOublie.hide();
var objData = {};
var url = $(this.element).attr('data-url');
objData = { mail: $("#user_login").val() };
if(validateEmail($("#user_login").val()))
{
$.ajax({
url: '{{ path('candidat_resetPwd') }}',
dataType: "json",
data : objData,
type: 'POST',
success: function (data)
{
if(data.success==1)
{
$("#msg-success").show();
$("#msg-success").find(".alert").html(data.message);
$("#msg-success").find(".alert").removeClass('alert-');
$("#msg-success").find(".alert").addClass('alert-info');
}
else
{
$("#msg-error").show();
$("#msg-error").html(data.message);
}
}
});
}
});
});
function validateEmail(sEmail) {
var filter = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
if (filter.test(sEmail)) {
return true;
}
else {
return false;
}
}
</script>
{% endblock %}
{% block contact %}
<p><a target="_blank" href="mailto:{{ mail_rh_recrutement }}">Contacter les ressources humaines</a></p>
{% endblock %}