{# BASE LOAD #}
{% extends 'base.html.twig' %}
{# TITLE TOP PAGE #}
{% block title %}CPI | Join Us {% endblock %}
{# CSS #}
{% block stylesheet %}
<link rel="stylesheet" href="{{ asset('css/recrutement.css')}}">
{% endblock %}
{# BODY HOME PAGE #}
{% block body %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<style>
.accueil2 li{
font-weight: 100;
color: #000 !important;
margin-left:20px
}
.accueil2 .btn2 button {
font-size: small;
font-weight: bold;
border-color: white;
padding: 12px;
padding-left: 20px;
padding-right: 20px;
color: white;
background-color: rgb(0,59,255);
border-radius: 30px;
margin-bottom: 40px;
}
.accueil2 .btn2 button:hover {
color: rgb(0,59,255);
background-color: white;
border-radius: 30px;
border: 1px solid rgb(0,59,255)!important;
}
</style>
<main>
<div class="accueil" style="padding-top:100px">
<div class="container">
<div class="row">
<div class="col-10 offset-1">
<div class="row text-light">
<div class="col-lg-6">
<img id="imagePrincipale" class="img-fluid w-75" src="{{asset('uploads/jobs/'~jobs.image)}}" alt="" style="border-radius:20px">
</div>
<div class="col-lg-6 order-first order-lg-last mt-5">
<div class="row py-4">
<div class="col">
<div class="logo">
<div class="image">
<img src="{{asset('img/recrutement/pin_bleu.svg')}}" alt="">
</div>
<div class="texte">
{% if jobs.lieuxJobs != '' %}
<p>{% if app.request.locale == 'fr' %}{{jobs.lieuxJobs.titreFr}}{% else %}{{jobs.lieuxJobs.titreEn}}{% endif %}</p>
{% endif %}
</div>
</div>
<div class="trait">
<img src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
</div>
</div>
<div class="col">
<div class="logo">
<div class="image">
<img src="{{asset('img/recrutement/flag-alt_bleu.svg')}}" alt="">
</div>
<div class="texte">
{% if jobs.businessUnit != '' %}
<p>{% if app.request.locale == 'fr' %}{{jobs.businessUnit.titreFr}}{% else %}{{jobs.businessUnit.titreEn}}{% endif %}</p>
{% endif %}
</div>
</div>
<div class="trait">
<img src="{{asset('img/recrutement/Ligne 80.svg')}}" alt="">
</div>
</div>
</div>
<h6># {{jobs.reference}}</h6>
<h1 class="pt-3 opensans_bold_54">{% if app.request.locale == 'fr' %}{{jobs.titreFr}}{% else %}{{jobs.titreEn}}{% endif %}</h1>
<hr>
<p class="opensans_light_18" style="padding-bottom:30px">{% if app.request.locale == 'fr' %}{{jobs.texteFr|raw}}{% else %}{{jobs.texteEn|raw}}{% endif %}</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="accueil2 pb-5">
<div class="container">
<div class="row">
<div class="col-12 col-lg-8 offset-lg-2">
<div class="btn2">
<a href="{{path('genererpdfjob',{'id':jobs.id})}}" target="_blank"><button style="border:solid 1px #fff;float:right"><i class="fa fa-download" aria-hidden="true" style="margin-right:5px"></i>{% if app.request.locale == 'fr' %}Télécharger l'offre d'emploi{% else %}Download the job offer{% endif %}</button></a>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="">
<div class="row">
{% if app.request.get('send') == 'success' %}
<h4 style="color:green">{% if app.request.locale == 'fr' %}Votre message a bien été envoyé{% else %}Your message has been sent{% endif %}</h4>
{% endif %}
{# PARCEQUE id = 10 est la page candidature c'est tt #}
{% if jobs.id != 10 %}
<div class="col-12 col-lg-8 offset-lg-2">
<div class="row">
<div class="menu my-5">
<div class="ligneBleu"></div>
<p>{% trans %}detail-mission{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':110})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</p>
</div>
{% if app.request.locale == 'fr' %}{{jobs.mission|raw}}{% else %}{{jobs.missionEn|raw}}{% endif %}
</div>
<div class="row">
<div class="menu my-5">
<div class="ligneBleu"></div>
<p>{% trans %}detail-profil{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':111})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</p>
</div>
{% if app.request.locale == 'fr' %}{{jobs.profilFr|raw}}{% else %}{{jobs.profilEn|raw}}{% endif %}
</div>
<div class="row">
<div class="menu my-5">
<div class="ligneBleu"></div>
<p>{% trans %}detail-proposition{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':112})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</p>
</div>
{% if app.request.locale == 'fr' %}{{jobs.propositionFr|raw}}{% else %}{{jobs.propositionEn|raw}}{% endif %}
</div>
<div class="row">
<div class="menu my-5">
<div class="ligneBleu"></div>
<p>{% trans %}detail-postuler{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':113})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</p>
</div>
{% endif %}
<h2 style="font-size: 24px;
font-weight: bold; color:black">{% if app.request.locale == 'fr' %}{{jobs.titreFr}}{% else %}{{jobs.titreEn}}{% endif %}</h2>
<form action="{{path('sendFormJoin')}}" method="POST" enctype='multipart/form-data'>
<input type="hidden" name="job" value="{{jobs.id}}">
<div class="formulaire">
<div class="row my-4">
<div class="col">
<p><b>{% trans %}form-nom{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':97})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</b> <span style="color:red;">*</span></p>
<input type="text" id="nom" name="nom" required>
</div>
<div class="col">
<p><b>{% trans %}form-prenom{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':98})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</b> <span style="color:red;">*</span></p>
<input type="text" id="prenom" name="prenom" required>
</div>
</div>
<div class="row mb-4">
<div class="col">
<p> <b>{% trans %}form-email{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':105})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</b><span style="color:red;">*</span></p>
<input type="email" id="email" name="email" required>
</div>
<div class="col">
<p> <b>{% trans %}form-tel{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':106})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</b> <span style="color:red;">*</span></p>
<input type="text" id="telephone" name="telephone" required>
</div>
</div>
<div class="row mb-4">
<p> <b>{% trans %}form-motivation{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':114})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</b></p>
<textarea id="motivation" name="motivation"></textarea>
</div>
<div class="row mb-4">
<p><b>{% trans %}form-cv{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':115})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</b> <span style="color:red;">*</span> (Ajouter max. 3 fichiers .pdf ou .jpg)</p>
<div class="cv">
<img class="mt-3 mb-3" src="{{asset('img/upload-icon.svg')}}" alt="image upload">
<div id="containFile1">
<label id="fichier1" for="file" class="label-file">{% if app.request.locale == 'fr' %}Importer Fichier 1{% else %}Import file 1{% endif %}</label>
<input id="file" name="cv[]" class="input-file" type="file" required>
</div>
<div id="containFile2" style="margin-top:10px">
<label id="fichier2" for="file2" class="label-file" >{% if app.request.locale == 'fr' %}Importer Fichier 2{% else %}Import file 2{% endif %}</label>
<input id="file2" name="cv[]" class="input-file" type="file">
</div>
<div id="containFile3" style="margin-top:10px">
<label id="fichier3" for="file3" class="label-file" >{% if app.request.locale == 'fr' %}Importer Fichier 3{% else %}Import file 3{% endif %}</label>
<input id="file3" name="cv[]" class="input-file" type="file" >
</div>
<p style="font-size: 10px; margin-top: 5px;">{% if app.request.locale == 'fr' %}ou cliquez-déposez vos fichiers PDF ici{% else %}or click-and-drop your PDF files here{% endif %}</p>
<p id="file-count" style="font-size: 12px; margin-top: 10px;font-weight:900;">{% if app.request.locale == 'fr' %}Aucun fichier sélectionné...{% else %}No files selected...{% endif %}</p>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
let file1 = document.getElementById('file');
let file2 = document.getElementById('file2');
let file3 = document.getElementById('file3');
let containFile1 = document.getElementById('containFile1');
let containFile2 = document.getElementById('containFile2');
let containFile3 = document.getElementById('containFile3');
let fileCount = document.getElementById('file-count');
// Function to update the file count and labels
function updateFileCount() {
let count = 0;
if (file1.files.length) count++;
if (file2.files.length) count++;
if (file3.files.length) count++;
if (count === 0) {
fileCount.textContent = '{% if app.request.locale == 'fr' %}Aucun fichier sélectionné...{% else %}No files selected...{% endif %}';
} else if (count === 3) {
fileCount.textContent = '{% if app.request.locale == 'fr' %}3 fichiers sélectionnés - Limite atteinte.{% else %}3 selected files - Limit reached.{% endif %}';
} else {
fileCount.textContent = count + ' {% if app.request.locale == 'fr' %}fichier sélectionné{% else %}fichiers sélectionnés{% endif %}';
}
updateLabelAndStyle(file1, containFile1, 'fichier1', 'Remplacer fichier 1');
updateLabelAndStyle(file2, containFile2, 'fichier2', 'Remplacer fichier 2');
updateLabelAndStyle(file3, containFile3, 'fichier3', 'Remplacer fichier 3');
}
function updateLabelAndStyle(fileInput, container, labelId, replacementText) {
if (fileInput.files.length) {
container.style.backgroundColor = '#82868f';
container.style.borderRadius = '30px';
document.getElementById(labelId).textContent = replacementText;
} else {
container.style.backgroundColor = 'transparent';
container.style.borderRadius = '0';
document.getElementById(labelId).textContent = '{% if app.request.locale == 'fr' %}Importer Fichier 1{% else %}Import file 1{% endif %}';
}
}
file1.addEventListener('change', function() {
updateLabelAndStyle(file1, containFile1, 'fichier1', 'Remplacer fichier 1');
updateFileCount();
});
file2.addEventListener('change', function() {
updateLabelAndStyle(file2, containFile2, 'fichier2', 'Remplacer fichier 2');
updateFileCount();
});
file3.addEventListener('change', function() {
updateLabelAndStyle(file3, containFile3, 'fichier3', 'Remplacer fichier 3');
updateFileCount();
});
updateFileCount();
});
</script>
</div>
<div class="row pt-3 d-flex flex-md-row flex-column">
<div class="col-12 col-md-6 d-flex justify-content-center justify-content-xl-start" style="margin-bottom:20px;">
<div class="g-recaptcha" data-sitekey="6Lf0RGEnAAAAAJcwFd-oTX1mAE4Rqr7ENpEHL70L"></div>
<div class="error-message">
{% if app.request.query.has('recaptcha_error') %}
<span style="color: red;">{% if app.request.locale == 'fr' %}La vérification reCAPTCHA a échoué. Veuillez réessayer.{% else %}The reCAPTCHA check failed. Please try again.{% endif %}</span>
{% endif %}
</div>
</div>
<div class="col-12 col-md-6 mt-3 mt-md-0">
<div class="col-12 ">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault" name="confidentialite" required>
<label class="form-check-label" for="flexCheckDefault">
{% trans %}form-condition1{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':108})}}"><button type="button" style="margin-left:10px;margin-right:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %} <a href="{{ path('politique',{'locale':app.request.locale})}}" target="_blank">{% trans %}form-condition2{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':109})}}"><button type="button" style="margin-left:10px" class="btn btn-warning"><i class="fa-solid fa-pen"></i></button></a>{% endif %}</a>
</div>
</div>
<div class="col-12 " style="margin-top:45px;">
<div class="bouton-bleu text-end">
<button type="submit">{% if app.request.locale == 'fr' %}Postuler{% else %}Apply{% endif %}</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Google reCAPTCHA script -->
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script src="https://www.google.com/recaptcha/api.js?hl={{ app.request.locale == 'fr' ? 'fr' : 'en' }}"></script>
{% endblock %}