{% extends 'base.html.twig' %}
{% block page_contents %}
<section class="section section-page-title bg-gradient py-xl-5 py-4" data-aos='fade-down'>
<div class="container">
<div class="row">
<div class="col-12 text-center text-white">
<h1 class="page-name font-weight-bold my-2">{% trans %}Soumettre une offre d’emploi{% endtrans %}</h1>
</div>
</div>
</div>
</section>
<section class="section section-form-information my-4">
<div class="container">
<div class="row">
<div class="col-xl-10 mx-auto">
<div class="i-box pt-4 pb-3 px-4" data-aos='zoom-in'>
<div class="font-weight-bold text-center text-purple mb-3 font-20">{% trans %}Vous souhaitez déposer une offre d’emploi pour une alternance, un stage ou une embauche ?{% endtrans %}</div>
<div class="row text-dark-purple">
<div class="col-lg-6">
<div class="font-weight-bold mb-2">{% trans %}Comment intégrer nos étudiants ?{% endtrans %}</div>
<ul class="pl-4">
<li>{% trans %}Alternance (disponibles 4 jours/semaine en entreprise, 1 jour à l’école){% endtrans %}</li>
<li>{% trans %}Stage pour l’été ou en stage alterné toute l’année{% endtrans %}</li>
<li>{% trans %}CDI pour les étudiants en fin d’études{% endtrans %}</li>
</ul>
</div>
<div class="col-lg-6">
<div class="font-weight-bold mb-2">{% trans %}3 Spécialisations technologiques et 2 MBA :{% endtrans %}</div>
<ul class="pl-4">
{% for expertise in expertises %}
<li>{{ expertise.name }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section section-form section-form-2">
<div class="container">
<div class="row">
<div class="col-xl-10 mx-auto mb-4" data-aos='fade-up'>
<div class="section-title mb-3"><span>/</span> {% trans %}Déposer une offre{% endtrans %}</div>
<p class="text-center text-dark-purple">{% trans %}Merci de remplir le formulaire ci-dessous, suite auquel nous vous recontacterons.{% endtrans %}</p>
<form id="form-offer" data-aos='fade-up'>
<div class="row">
<div class="col-lg-3 col-md-4">
<div class="box-logo d-flex flex-column h-100">
<div class="mb-1 text-md-left text-center">{% trans %}Logo{% endtrans %}</div>
<div class="text-center b-user-img mb-3">
<div class="ml-md-0 mx-auto">
<img id='item-img-output' class="img-photo rounded" src="{{ asset('assets/images/no-img/mask-logo.png') }}">
<input hidden id="file_photo" name="logo" accept=".jpg, .jpeg, .png" type="file">
<i class="fa-solid fa-camera" aria-hidden="true"></i>
</div>
</div>
</div>
</div>
<div class="col-lg-9 col-md-8 d-flex flex-column justify-content-center">
<div class="form-group">
<input type="text" class="form-control" name="companyName" placeholder="{% trans %}Nom de l'entreprise *{% endtrans %}" required>
</div>
<div class="form-group">
<input type="text" class="form-control" name="website" placeholder="Site web">
</div>
</div>
</div>
<div class="form-group">
<textarea class="form-control" name="presentation" placeholder="{% trans %}Bref présentaion de l'entreprise{% endtrans %}"></textarea>
</div>
<div class="form-header font-weight-bold text-dark-purple mb-3">{% trans %}Information de contact{% endtrans %}</div>
<div class="row">
<div class="col-lg-4 d-flex flex-column">
<div class="form-group row row-gender align-items-center mt-2">
<label class="col-form-label font-weight-normal col-4 pt-0 pb-0">{% trans %}Civilité{% endtrans %}<span class="text-orange">*</span> :</label>
<div class="col-8 pl-0">
<div class="form-check form-check-inline mr-0">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="mrs" name="gender" value="1" required>
<label class="custom-control-label text-dark-purple" for="mrs">{% trans %}Madame{% endtrans %}</label>
</div>
</div>
<div class="form-check form-check-inline ml-3 mr-0">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="mr" name="gender" value="0" required>
<label class="custom-control-label text-dark-purple" for="mr">{% trans %}Monsieur{% endtrans %}</label>
</div>
</div>
</div>
</div>
<div class="form-group mt-auto">
<input type="text" class="form-control" name="position" placeholder="{% trans %}Fonction{% endtrans %}*" required>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<input type="text" class="form-control" name="firstName" placeholder="{% trans %}Prénom{% endtrans %}*" required>
</div>
<div class="form-group">
<input type="text" class="form-control" name="email" placeholder="Email*" required>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<input type="text" class="form-control" name="lastName" placeholder="Nom*" required>
</div>
<div class="form-group">
<input type="text" class="form-control" name="phone" placeholder="{% trans %}Téléphone{% endtrans %}*" required>
</div>
</div>
</div>
<div class="form-group row row-gender align-items-center mt-2">
<label class="col-form-label font-weight-normal pl-3 pt-0 pb-0 text-nowrap">{% trans %}De quelle manière préférez-vous être contactée ?{% endtrans %}</label>
<div class="col pl-0 ml-3">
<div class="form-check form-check-inline mr-0">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="offerType-phone" name="offerType[0]" value="0">
<label class="custom-control-label text-dark-purple" for="offerType-phone">{% trans %}Téléphone{% endtrans %}</label>
</div>
</div>
<div class="form-check form-check-inline ml-3 mr-0">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="offerType-email" name="offerType[1]" value="1">
<label class="custom-control-label text-dark-purple" for="offerType-email">{% trans %}Email{% endtrans %}</label>
</div>
</div>
</div>
</div>
<div class="form-header font-weight-bold text-purple mb-3">{% trans %}Votre offre d’emploi{% endtrans %}</div>
<div class="form-group">
<input type="text" class="form-control" name="offerTitle" placeholder="{% trans %}Intitulé de l'offre *{% endtrans %}" required>
</div>
<div class="form-header font-weight-bold text-dark-purple mb-3">{% trans %}Type de contrat{% endtrans %}</div>
<div class="form-group row">
<div class="col-lg-2">
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="contract-1" name="contract" value="1">
<label class="custom-control-label text-dark-purple font-weight-normal" for="contract-1">CDI</label>
</div>
</div>
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="contract-2" name="contract" value="2">
<label class="custom-control-label text-dark-purple font-weight-normal" for="contract-2">CDD</label>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="contract-3" name="contract" value="3">
<label class="custom-control-label text-dark-purple font-weight-normal" for="contract-3">Stage d’été</label>
</div>
</div>
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="contract-4" name="contract" value="4">
<label class="custom-control-label text-dark-purple font-weight-normal" for="contract-4">Stage alterné • 4j/semaine</label>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="contract-5" name="contract" value="5">
<label class="custom-control-label text-dark-purple font-weight-normal" for="contract-5">Contrat d’apprentissage • 4j/semaine</label>
</div>
</div>
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" id="contract-6" name="contract" value="6">
<label class="custom-control-label text-dark-purple font-weight-normal" for="contract-6">Contrat de professionnalisation • 4j/semaine</label>
</div>
</div>
</div>
</div>
<div class="form-header font-weight-bold text-dark-purple mb-3">{% trans %}Domaine/Expertise <span class="text-orange">*</span>{% endtrans %}</div>
<div class="form-group checkbox-expertise-required">
{% for i,expertise in expertises %}
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="expertise-{{ expertise.id }}" name="expertise[{{i}}]" value="{{ expertise.id }}">
<label class="custom-control-label text-dark-purple font-weight-normal" for="expertise-{{ expertise.id }}">{{ expertise.name }}</label>
</div>
</div>
{% endfor %}
</div>
<div class="form-header font-weight-bold text-dark-purple mb-3">{% trans %}À proximité du campus{% endtrans %}</div>
<div class="form-group row">
{% for i,campus in campuses %}
<div class="col-lg-3 col-md-6">
<div class="form-check mx-0 px-0 mb-2">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="campuses-{{ campus.id }}" name="campuses[{{i}}]" value="{{ campus.id }}">
<label class="custom-control-label text-dark-purple font-weight-normal" for="campuses-{{ campus.id }}">{{ campus.name }}</label>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="form-group row">
<div class="col-lg-6 mb-lg-0 mb-3">
<select class="form-control" name="studyLevel">
<option value>{% trans %}Niveau minimum requis{% endtrans %}</option>
{% for studyLevel in studyLevels %}
<option value="{{ studyLevel.id }}">{{ studyLevel.name }}</option>
{% endfor %}
</select>
</div>
<div class="col-lg-6">
<input type="number" class="form-control" min="0" name="duration" placeholder="{% trans %}Durée du contrat (par mois){% endtrans %}">
</div>
</div>
<div class="form-group">
<textarea class="form-control" name="description" placeholder="{% trans %}Description de votre offre{% endtrans %}"></textarea>
</div>
<div class="form-group">
<textarea class="form-control" name="expectProfile" placeholder="{% trans %}Profil recherché{% endtrans %}"></textarea>
</div>
<div class="form-header font-weight-bold text-dark-purple mb-3">
{% trans %}Sélectionnez les compétences nécessaires pour cette offre <span class="font-weight-normal font-italic">(<span id="skill-selected">0</span> compétence(s) sélectionnée(s))</span>{% endtrans %}
</div>
<div class="list-offre-checkbox mb-3">
{% for i,skill in skills %}
<label class="switch">
<input type="checkbox" name="skill[{{i}}]" value="{{ skill.id }}">
<span class="slider">{{ skill.name }}</span>
</label>
{% endfor %}
</div>
<div class="form-group row">
<div class="col-lg-6 mb-lg-0 mb-3">
<div class="offre-date position-relative mt-1">
<input type="text" class="form-control" id="datepicker-min" name="validDate" placeholder="{% trans %}Date de validité{% endtrans %}" required>
</div>
</div>
<div class="col-lg-6 field-upload">
<div class="group-item">
<input id="curriculumVitae" type="file" class="form-control" name="descriptionFile" accept=".pdf,.docx,.doc"/>
<label class="d-flex flex-column" for="curriculumVitae">
<div class="d-flex flex-sm-row flex-column">
<div class="flex-1 text-dark-purple line-height-normal">
<div class="font-weight-bold">{% trans %}Pièce jointe de la fiche du poste{% endtrans %}</div>
<div class="font-weight-normal font-14">{% trans %}(format accepté : pdf, word. Taille max : 10 MB){% endtrans %}</div>
</div>
<span class="upload-btn cursor bg-dark-purple ml-sm-auto mx-auto mt-sm-0 mt-3">{% trans %}Télécharger{% endtrans %}</span>
</div>
<div class="file-desc flex-1 d-flex align-items-center mt-2 mb-4 pl-0">
<i class="fa-solid fa-paperclip-vertical text-orange mr-2"></i>
<span class="upload-file-name"></span>
<i class="far fa-xmark ml-3 text-red cursor" data-id></i>
</div>
</label>
</div>
</div>
</div>
{% if captcha_enabled %}
<div class="captcha-row mb-4 d-flex justify-content-center">
<div class="g-recaptcha animate__animated" data-sitekey="{{captcha_key}}"></div>
</div>
{% endif %}
<div class="notification-error mb-4 text-center text-danger font-weight-bold" style="display: none;"></div>
<div class="text-center form-submit">
<button type="submit" id="btn-submit" class="link-gradient"><span>{% trans %}Soumettre votre offre{% endtrans %}</span><i class="far fa-arrow-right"></i></button>
</div>
</form>
</div>
</div>
</div>
</section>
<div class="modal fade" id="uploadModal" tabindex="-1" role="dialog" aria-labelledby="uploadModalTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container px-0">
<div class="row">
<div class="col-12">
<div id="upload-demo"></div>
</div>
</div>
</div>
<div class="text-center mt-3">
<button type="button" id="cancelCropBtn" class="common-btn btn-cancel" data-dismiss="modal">{% trans %}Annuler{% endtrans %}</button>
<button type="button" id="cropImageBtn" class="common-btn">{% trans %}Recadrer{% endtrans %}</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="thankYouModal" tabindex="-1" role="dialog" aria-labelledby="thankYouModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<a href="{{ path('home') }}">
<img src="{{ asset('assets/images/logo.svg') }}" alt="Estiam France">
</a>
</div>
<div class="modal-body">
<div class="text-center mb-4">
{% trans %}Merci ! Votre offre a été bien envoyée.{% endtrans %}<br/>
{% trans %}Notre service dédié va vous contacter très bientôt.{% endtrans %}<br/>
{% trans %}L'équipe ÉSTIAM.{% endtrans %}
</div>
<div class="text-center">
<button type="button" class="common-btn clean-form" data-dismiss="modal">{% trans %}Fermer{% endtrans %}</button>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block custom_javascripts %}
<script src="{{ asset('assets/js/croppie.js') }}"></script>
<script type="text/javascript">
$(document).ready(function(){
/* === Crop logo --- */
$('.img-photo').on('click', function () {
$('#file_photo').click();
});
$('.b-user-img i').on('click', function () {
$('#file_photo').click();
});
$('#file_photo').change(function(){
$('#uploadModal').modal('show');
$('.close').click(function () {
$("#myModal").modal('hide');
});
$('#cancelCropBtn').click(function () {
$("#myModal").modal('hide');
});
});
var $uploadCrop,
tempFilename,
rawImg,
imageId,
base64ImageContent;
function readFile(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('.upload-demo').addClass('ready');
$('#uploadModal').modal('show');
rawImg = e.target.result;
}
reader.readAsDataURL(input.files[0]);
}
else {
swal("Sorry - you're browser doesn't support the FileReader API");
}
}
$uploadCrop = $('#upload-demo').croppie({
viewport: {
width: 150,
height: 150,
type: 'square'
},
boundary: {
width: 300,
height: 300
},
enforceBoundary: false,
enableExif: true
});
$('#uploadModal').on('shown.bs.modal', function(){
$uploadCrop.croppie('bind', {
url: rawImg
}).then(function(){
console.log('jQuery bind complete');
});
});
$('#file_photo').on('change', function () {
readFile(this);
});
$('#cropImageBtn').on('click', function (ev) {
$uploadCrop.croppie('result', {
type: 'base64',
format: 'png',
fill: '#fff',
size: {
width: 160,
height: 160
}
}).then(function (resp) {
$('#item-img-output').attr('src', resp);
var image = $('#item-img-output').attr('src');
// base64ImageContent = image.replace(/^data:image\/(jpeg|jpg);base64,/, "");
base64ImageContent = image;
});
$('#uploadModal').modal('hide');
});
/* === Upload file --- */
var input = $('.field-upload input[type=file]');
input.each(function(event){
$(this).change(function(event) {
let result = checkFile($(this));
if(result){
$(this).val('');
$('.notification-error').text(result).show();
handleNotification($('.notification-error'));
return false;
}
$(this).addClass('selected');
$('.upload-file-name').html(event.target.files[0].name);
});
});
var current_input;
$('.fa-xmark').click(function (event) {
current_input = $(this).closest('.group-item').find('input[type=file]');
event.preventDefault();
event.stopPropagation();
current_input.val('');
current_input.removeClass('selected');
});
$('.switch input').click(function(){
let selectedSkill = $('.switch input:checked').length;
// if(selectedSkill > 5){
// this.checked = false;
// $('.notification-error').text(`{% trans %}Vous avez la possibilité de choisir 5 options au maximum{% endtrans %}`).show();
// handleNotification($('.notification-error'));
// return false;
// }
$('#skill-selected').text(selectedSkill);
});
$('#form-offer').on('submit', function (e) {
event.preventDefault();
let $button = $(this).find('#btn-submit');
loadButton($button);
{% if captcha_enabled %}
if (grecaptcha.getResponse().length == 0) {
$('.notification-error').text('{% trans %}Veuillez vérifier le recaptcha{% endtrans %}').show();
handleNotification($('.notification-error'));
removeLoadButton($button);
e.preventDefault();
return false;
}
{% endif %}
if(isChecked('.checkbox-expertise-required')){
showMessage('{% trans %}Veuillez sélectionner Domaine/Expertise{% endtrans %}');
return false;
}
// Cover form data
let data = {};
var formData = new FormData();
$(this).serializeArray().forEach((object)=>{
data[object.name] = object.value;
});
if(base64ImageContent){
const file = DataURIToBlob(base64ImageContent);
formData.append('logo', file, 'image.jpg') ;
}
if($("input[name=descriptionFile]")[0].files[0]){
formData.append(`descriptionFile`, $("input[name=descriptionFile]")[0].files[0]);
}
for (var key in data ) {
formData.append(key, data[key]);
}
// End cover form data
$.ajax({
url: "{{ path('offer.save') }}",
type: "POST",
dataType: 'json',
data : formData,
contentType: false,
processData: false,
success: function(result) {
if(result.status == 'success'){
base64ImageContent = null;
resetForm();
$('#thankYouModal').modal();
removeLoadButton($button)
}else{
$('.notification-error').text(result.errors.errorMessage).show();
}
grecaptcha.reset();
}
}).always(function () {
removeLoadButton($button)
});
});
}) ;
function resetForm(){
$('#form-offer').each(function(){
this.reset();
$('.fa-xmark').trigger('click');
$('#item-img-output').attr('src','');
$('#skill-selected').text(0);
});
}
</script>
{% endblock %}