This site attempts to protect users against
Cross-Site Request Forgeries attacks. In order to do so, you must have JavaScript enabled in your web browser otherwise this site will fail to work correctly for you. See details of your web browser for how to enable JavaScript.
CHRONOPOST
Connexion / Inscription
Recrutement externe
Toggle navigation
CHRONOPOST
Nos offres d'emploi
Espace candidat
Candidature spontanée
ajuster le contrast
réinitialiser la taille du texte
augmenter la taille du texte
diminuer la taille du texte
Formulaire de candidature
Déjà inscrit ?
Entrez vos informations de connexion
Courriel
Mot de passe
Je me connecte
Identifiants oubliés ?
Compléter le dossier de candidature
Pré-remplir le dossier à l'aide de mon CV
Joindre mon CV
Les libellés avec un astérisque(*) signalent les champs obligatoires
Données personnelles
Civilité
Madame*
Monsieur*
Nom*
Prénom*
Date de naissance
jj
12345678910111213141516171819202122232425262728293031
Mois de naissance
mmJanvierFévrierMarsAvrilMaiJuinJuilletAoûtSeptembreOctobreNovembreDécembre
Année de naissance
aaaa
2030202920282027202620252024202320222021202020192018201720162015201420132012201120102009200820072006200520042003200220012000199919981997199619951994199319921991199019891988198719861985198419831982198119801979197819771976197519741973197219711970196919681967196619651964196319621961196019591958195719561955195419531952195119501949194819471946
Lieu de résidence*
Ville
Pays*
FranceAfghanistanAfrique du SudAlbanieAlgérieAllemagneAndorreAngolaAnguillaAntarctiqueAntigua-et-BarbudaArabie saouditeArgentineArménieArubaAustralieAutricheAzerbaïdjanBahamasBahreïnBangladeshBarbadeBelgiqueBelizeBéninBermudesBhoutanBiélorussieBirmanieBolivieBosnie-HerzégovineBotswanaBrésilBruneiBulgarieBurkina FasoBurundiCambodgeCamerounCanadaCap-VertChiliChineChypreColombieComoresCorée du NordCorée du SudCosta RicaCôte d'IvoireCroatieCubaCuraçaoDanemarkDjiboutiDominiqueÉgypteÉmirats arabes unisÉquateurÉrythréeEspagneEstonieEswatiniÉtats fédérés de MicronésieÉtats-UnisÉthiopieFidjiFinlandeGabonGambieGéorgieGéorgie du Sud-et-les îles Sandwich du SudGhanaGibraltarGrèceGrenadeGroenlandGuadeloupeGuamGuatemalaGuerneseyGuinéeGuinée équatorialeGuinée-BissauGuyanaGuyaneHaïtiHondurasHong KongHongrieÎle BouvetÎle ChristmasÎle de ManÎle NorfolkÎles ÅlandÎles CaïmansÎles CocosÎles CookÎles FéroéÎles Heard-et-MacDonaldÎles Mariannes du NordÎles MarshallÎles mineures éloignées des États-UnisÎles PitcairnÎles SalomonÎles Turques-et-CaïquesÎles Vierges britanniquesÎles Vierges des États-UnisIndeIndonésieIrakIranIrlandeIslandeIsraëlItalieJamaïqueJaponJerseyJordanieKazakhstanKenyaKirghizistanKiribatiKoweïtLa RéunionLaosLesothoLettonieLibanLiberiaLibyeLiechtensteinLituanieLuxembourgMacaoMacédoine du NordMadagascarMalaisieMalawiMaldivesMaliMalouinesMalteMarocMartiniqueMauriceMauritanieMayotteMexiqueMoldavieMonacoMongolieMonténégroMontserratMozambiqueNamibieNauruNépalNicaraguaNigerNigeriaNiueNorvègeNouvelle-CalédonieNouvelle-ZélandeOmanOugandaOuzbékistanPakistanPalaosPalestinePanamaPapouasie-Nouvelle-GuinéeParaguayPays-BasPays-Bas caribéensPérouPhilippinesPolognePolynésie françaisePorto RicoPortugalQatarRépublique arabe sahraouie démocratiqueRépublique centrafricaineRépublique démocratique du CongoRépublique dominicaineRépublique du CongoRoumanieRoyaume-UniRussieRwandaSaint-BarthélemySaint-Christophe-et-NiévèsSaint-MarinSaint-MartinSaint-Pierre-et-MiquelonSaint-Siège (État de la Cité du Vatican)Saint-Vincent-et-les-GrenadinesSainte-Hélène, Ascension et Tristan da CunhaSainte-LucieSalvadorSamoaSamoa américainesSao Tomé-et-PrincipeSénégalSerbieSeychellesSierra LeoneSingapourSlovaquieSlovénieSomalieSoudanSoudan du SudSri LankaSuèdeSuisseSurinameSvalbard et ile Jan MayenSyrieTadjikistanTaïwanTanzanieTchadTchéquieTerres australes et antarctiques françaisesTerritoire britannique de l'océan IndienThaïlandeTimor orientalTogoTokelauTongaTrinité-et-TobagoTunisieTurkménistanTurquieTuvaluUkraineUruguayVanuatuVenezuelaViêt NamWallis-et-FutunaYémenZambieZimbabwe
Téléphone*
Courriel*
Profil
Niveau d'expérience*
-EtudiantJeune diplôméConfirmé
Langue 1 et niveau
-AllemandAnglaisChinoisEspagnolFrançaisJaponais
niveauBilingueCourantOpérationnel
Langue 2 et niveau
-AllemandAnglaisChinoisEspagnolFrançaisJaponais
niveauBilingueCourantOpérationnel
Vos mobilités
-01 Ile de France02 Nord-Ouest03 Nord-Est04 Sud-Est05 Sud-Ouest06 Outre-Mer07 Nationale08 Europe09 International
Votre curriculum vitae
Choisissez un fichier*
Curriculum Vitae au format Word ou PDF [2.048 Mo max]
Origine de votre candidature*
-1 Jeune 1 SolutionAgefiphAPECAutres sites d'emploiBouche à oreilleCabinetCadremploiCadremploi LightCandidature spontanéeCAP CAMPUSChasseCooptationÉcolesEngagement-jeunesForum EmploiHanploi.comHelloworkHellowork - RegionsJobIndeedJob à coeurJobAvizJobiJobaJobTeaserJobtransportJoobleKEYCOOPT CHRONOPOSTL'ÉtudiantLa bonne alternanceLes Echos StartLinkedinMétéojobMonsterMoteur de rechercheOptionCarrierePôle EmploiRéseaux sociauxSite chronopost.frTalent.comVivastreetWan2beeWATs4UWizbii
Contrôle de sécurité
Je consens de recevoir par CHRONOPOST des offres d'emploi ciblées correspondant à mon profil.
En cochant cette case et en soumettant ce formulaire, je consens à ce que mes données personnelles soient utilisées dans le cadre du traitement de ma candidature et accepte d'être contacté par le Service Recrutement - CHRONOPOST pour toute procédure d'embauche.*
Valider ma candidature
Annuler ma candidature
Si vous avez déjà un compte et souhaitez mettre à jour vos informations professionnelles ou vos identifiants
cliquez ici
En validant ce formulaire, vous consentez au recueil et au traitement de vos données personnelles par Chronopost afin d'assurer la gestion de votre candidature et de tout processus d'embauche. À compter de la validation de ce formulaire, les données collectées seront conservées pour une durée maximum de deux ans et resteront strictement confidentielles.
Conformément à la réglementation applicable en matière de protection des données à caractère personnel, vous bénéficiez d'un droit d'accès, de rectification, d'opposition et de suppression des données vous concernant ainsi qu'un droit à la limitation du traitement, que vous pouvez exercer via l'adresse mail dataprotection-drh@chronopost.fr
, sous réserve d'indiquer votre nom, prénom ainsi que votre adresse postale ou encore, auprès de l'autorité de contrôle.
function saveAndLoading(){
$('#form-semantique').submit();
$('body').html('
');
}
$(function(){
// vérifie si l'email de l'individu existe deja en base
$('#email').focusout(function(){
var email = $(this).val();
if(email.length > 0){
$.ajax({
type: "POST",
url: "/_xhr/getEmailExiste.php",
data: {
email: email,
},
success: function(data){
if(data['msg']){
$('#help-email').removeClass('hidden');
$('#help-email').html(data['msg']);
}
else{
$('#help-email').addClass('hidden');
}
}
});
}
});
$('#top').click(function(){
$('body').scrollTo('#blocInfoConnection');
});
});
$(document).ready(function() {
// Sélectionnez toutes les balises
$('label').each(function() {
// Vérifiez si la balise parente a la classe "has-error"
if ($(this).parent().hasClass('has-error')) {
// Ajoutez l'élément
à la suite de chaque balise avec la classe "has-error"
$(this).prepend('');
} else {
// Retirez l'élément de chaque balise sans la classe "has-error"
$(this).find('i.far.fa-exclamation-triangle contrast').remove();
}
});
});
$(function() {
$.fn.autoCompleteDaemon = function(cmd, cmdParam) {
this.setValue = function(params) {
const optionId = params.id;
const optionText = params.text;
const currentSelect = $(this);
const escapedOptionId = $.escapeSelector(optionId);
if (currentSelect.find("option[value='" + escapedOptionId + "']").length) {
currentSelect.val(optionId);
}
else {
currentSelect.append(new Option(optionText, optionId, true, true));
}
/*
* we will only trigger select2 change event
* it will avoid potential useless calls on the page where we have extra triggers on auto complete input
* set `globalTrigger` as true to trigger really jquery change
*/
currentSelect.trigger(params.globalTrigger ? 'change' : 'change.select2');
return this;
};
this.isIncludeAll = function(showAllSelector) {
let showAllMiss = false;
const myShowAllMissBoxes = $(this).closest('form').find(showAllSelector);
if (myShowAllMissBoxes.length > 0) {
const myBox = myShowAllMissBoxes.first();
if (myBox.hasClass('iCheck')) {
myBox.iCheck('update');
}
showAllMiss = myBox.prop('checked');
}
return showAllMiss;
};
this.initWithDefaultOptions = function(customOptions) {
const defaultOptions = {
'allowClear': true,
// allowClear needs placeholder even it's empty, otherwise a javascript exception will occur
'placeholder': '',
// following function will be used for setFreeValue feature
'templateSelection': function(item) {
if (item.id == 0) {
const displayData = $(item.element).data('display');
if (displayData) {
return displayData;
}
}
return item.text;
},
'ajax': {
'url': 'https://recrutement.chronopost.fr/_svc/api.php',
'delay': 250,
'dataType': 'json',
},
};
const finalOptions = $.extend(true, defaultOptions, customOptions);
$(this).each(function(index, selectInput) {
const selectElement = $(selectInput);
const parent = selectElement.closest('div.modal');
let dedicatedOptions = finalOptions;
if (parent.length) {
dedicatedOptions = $.extend(dedicatedOptions, {'dropdownParent': parent});
}
selectElement.select2(dedicatedOptions);
});
return $(this);
};
this.initFocusSearchBar = function() {
$(this).on('select2:open', function() {
const parent = $(this).data('select2').options.options.dropdownParent;
const searchBarSelector = '.select2-search__field';
const foundSearchBars = parent ? $(parent).find(searchBarSelector) : $(searchBarSelector);
if (foundSearchBars.length) {
foundSearchBars.last()[0].focus();
}
});
return this;
};
this.initCommonTrigger = function() {
$(this).on('select2:select', function(event) {
const currentInput = $(this);
const selectedOption = event.params.data;
const extraTrigger = currentInput.data('autoCompleteExtraSelectTrigger');
if ( extraTrigger && typeof window[extraTrigger] == 'function'
&& window[extraTrigger](selectedOption, event) ) {
return;
}
currentInput.attr('title', selectedOption.text);
if (currentInput.hasClass('autoReloadSelect')) {
currentInput.closest('form').submit();
}
}).on('select2:opening', function(event) {
const currentInput = $(this);
if (currentInput.attr('readonly')) {
event.preventDefault();
currentInput.select2('close');
return false;
}
}).on('select2:clearing', function(event) {
if ($(this).attr('readonly')) {
event.preventDefault();
return false;
}
}).autoCompleteDaemon('initFocusSearchBar');
return this;
};
this.setFreeInputValueDisplay = function(params) {
const currentSelect = $(this);
const displayText = params.text;
let selectedOption = currentSelect.find(':selected');
if (selectedOption.length == 0) {
// we don't check the existence of 0 value element (free input text) here, so we will always trigger a change event later
currentSelect.autoCompleteDaemon('setValue', params);
selectedOption = currentSelect.find(':selected');
}
if (selectedOption.val() == '0') {
selectedOption.data('display', displayText).text(displayText);
currentSelect.trigger('change.select2');
}
return this;
};
this.initFreeInputTrigger = function(params) {
const hiddenFreeInput = params.hiddenFreeInput;
const displayFormat = params.displayFormat || '%s';
const valueAsInput = (typeof params.valueAsInput == 'undefined') ? true : params.valueAsInput;
const cleanHiddenInSelect = params.cleanHiddenInSelect || false;
$(this).on('select2:closing', function(event) {
const currentSelect = $(this);
const selectedOption = currentSelect.find(':selected');
const searchBoxInput = currentSelect.data('select2').dropdown.$search.val();
const originalInternalEvent = event.params.args.originalSelect2Event;
const closeBySelect = originalInternalEvent && originalInternalEvent._type == 'select';
// this detection on real option selected is only designed for the case when value is not as input
const realOptionSelected = !valueAsInput && selectedOption.length && selectedOption.val() != '0';
let inputValue = searchBoxInput;
if (closeBySelect) {
/*
* in the case when we just selected an element from select list (select -> close):
* we reset the hidden input value if (logic combination: and)
* + value is not same as input
* === the following 2 mode / detection are only for the case when value is not same as input ===
* + the mode clean hidden input in select is enabled
* + a real option is selected (select is not empty, and the choosen one is not a fake free input)
* we do nothing in other cases
*/
if (valueAsInput || !cleanHiddenInSelect || !realOptionSelected) {
return;
}
else {
// reset hidden input value to avoid polluting hidden input (for autocomplete job in job dashboard)
inputValue = '';
}
}
else if ( (!valueAsInput && realOptionSelected)
|| $.inArray(searchBoxInput, ['', '0', '0.0', '-0.0']) != -1 ) {
/*
* in the case when we close the select list without choosing an element
* we do nothing if (logic combination: or)
* - a real option is selected when value is not same as input
* - even no real option is selected, we exclude the input value which is considered as empty by php
*/
return;
}
if (!closeBySelect) {
/*
* add fake option (free input) or set fake option display text if necessary
* we don't have to do that if we have just selected an option (a real one + clean hidden enabled)
* because this condition is more complex than it shows:
* we skip this block when !valueAsInput && closeBySelect && cleanHiddenInSelect && realOptionSelected
* that is the only case that we can reach here if closeBySelect is true
*/
const displayText = displayFormat.replace('%s', searchBoxInput);
const callFunc = valueAsInput ? 'setValue' : 'setFreeInputValueDisplay';
const elementParams = {
'id': valueAsInput ? searchBoxInput : 0,
'text': displayText,
};
currentSelect.autoCompleteDaemon(callFunc, elementParams);
}
$(hiddenFreeInput).val(inputValue);
})
.on('select2:clear', function() {
$(hiddenFreeInput).val('');
});
return this;
};
return this[cmd](cmdParam);
};
});
$(function() {
const autoCompleteCpClass = 'select2-autocomplete-cp';
const autoCompleteCpSelector = '.' + autoCompleteCpClass;
const cityInputSelector = $('.ville_autocomplete');
$('#pays, #id_pays, #loc_pays').change(function() {
const countryCode = $(this).val() || '1';
const isAutocompleteEnabled = countryCode === '1';
cityInputSelector.each(function () {
const cityInput = $(this);
if (!cityInput.parent().hasClass('cp-autocomplete-wrapper')) {
cityInput.wrap('');
}
const wrapper = cityInput.parent();
cityInput.toggle(!isAutocompleteEnabled);
cityInput.hide();
if (wrapper.find(autoCompleteCpSelector).length === 0) {
$('')
.addClass(autoCompleteCpClass)
.insertAfter(cityInput);
}
const currentAutoComplete = wrapper.find(autoCompleteCpSelector);
if (currentAutoComplete.hasClass('select2-hidden-accessible')) {
currentAutoComplete.select2('destroy').val(null);
}
currentAutoComplete.autoCompleteDaemon('initWithDefaultOptions', {
placeholder: cityInput.attr('placeholder') || '',
minimumInputLength: 4,
ajax: {
url: '/_xhr/getPostalCodeByVille.php',
data: function (params) {
return {
ville: params.term
};
},
processResults: function (data) {
return {
results: $.map(data.results, function (item) {
return {
id: item.codepostal,
text: item.ville,
ville: item.ville,
codepostal: item.codepostal
};
})
};
}
},
templateResult: function (item) {
if (item.ville) {
return item.codepostal + ' - ' + item.ville;
}
return item.text;
}
})
.on('select2:select', function (event) {
const selected = event.params.data;
cityInput.val(selected.ville).trigger('change');
const $cp = cityInput.closest('form').find('.cp_autocomplete');
$cp.val(selected.codepostal);
const $cpAutoComplete = $cp.siblings('.select2-autocomplete-ville');
if ($cpAutoComplete.length) {
$cpAutoComplete.autoCompleteDaemon('setValue', {
id: selected.codepostal,
text: selected.codepostal
});
}
})
.on('select2:clear', function () {
cityInput.val('');
$('.cp_autocomplete').val('').trigger('change');
})
.autoCompleteDaemon('initFreeInputTrigger', {
hiddenFreeInput: cityInput
})
.autoCompleteDaemon('initFocusSearchBar');
cityInput.on('change', function () {
const val = $(this).val();
if (val) {
currentAutoComplete.autoCompleteDaemon('setValue', {
id: val,
text: val
});
} else {
currentAutoComplete.val(null).trigger('change');
}
});
const initVal = cityInput.val();
if (initVal) {
currentAutoComplete.autoCompleteDaemon('setValue', {
id: initVal,
text: initVal
});
}
})
}).change();
})
let commonPostalCodeLength = {
'1' : 5,
'78' : 5,
'79' : 5,
'90' : 5,
'138' : 5,
'141' : 5,
'156' : 5,
'181' : 5,
'190' : 5
};
$(function() {
let firstInit = true;
const autoCompleteCityClass = 'select2-autocomplete-ville';
const autoCompleteCitySelector = '.' + autoCompleteCityClass;
const postalCodeInputSelector = '.cp_autocomplete';
$('#pays, #id_pays, #loc_pays').change(function() {
const countryInput = $(this);
// a modifier lorsque la table de ref pays existera
const countryCode = countryInput.val() || '1';
const targetCodeLength = commonPostalCodeLength[countryCode];
let postalCodeInput = countryInput.closest('form').find(postalCodeInputSelector);
if (postalCodeInput.length == 0) {
// fallback to use global selector here, because some pages don't have surrounding form lol
postalCodeInput = $(postalCodeInputSelector);
}
postalCodeInput.addClass('select2-autocomplete').each(function() {
const isManualInput = !targetCodeLength;
const currentInput = $(this).toggle(isManualInput);
if (currentInput.siblings(autoCompleteCitySelector).length === 0) {
$('')
.addClass(autoCompleteCityClass).insertAfter(currentInput);
$('')
.text('Assistance de saisie pour la ville via code postal')
.insertAfter(currentInput);
}
const currentAutoComplete = currentInput.siblings(autoCompleteCitySelector).toggle(!isManualInput);
if (currentAutoComplete.hasClass('select2-hidden-accessible')) {
currentAutoComplete.select2('destroy').val(null);
}
if (!firstInit) {
postalCodeInput.val('').trigger('change');
}
if (isManualInput) {
return;
}
currentAutoComplete.autoCompleteDaemon('initWithDefaultOptions', {
'placeholder': currentInput.attr('placeholder') || '',
'minimumInputLength': targetCodeLength,
'maximumInputLength': targetCodeLength,
'ajax': {
'url': '/_xhr/getVilles.php',
'data': function(params) {
return {
'code_postal': params.term,
'pays': countryCode,
};
},
'processResults': function(data, params) {
return {
'results': $.map(data.results, function(item) {
return {
'id': params.term,
'text': params.term,
'city': item,
};
}),
};
},
},
'templateResult': function(item) {
if (item.city) {
return item.id + ' - ' + item.city;
}
return item.text;
},
}).on('select2:select', function(event) {
const currentSelect = $(this);
const selectedOption = event.params.data;
const cityAutoCompleteSelector = '.ville_autocomplete';
let cityInput = currentSelect.closest('form').find(cityAutoCompleteSelector);
if (cityInput.length == 0) {
// fallback to whole page
cityInput = $(cityAutoCompleteSelector);
}
cityInput.val(selectedOption.city).trigger('change');
// we trigger change here to ensure some extra change trigger in page
currentSelect.siblings(postalCodeInputSelector).val(selectedOption.id).trigger('change');
}).on('select2:clear', function(event) {
$(this).siblings(postalCodeInputSelector).val('').trigger('change');
}).autoCompleteDaemon('initFreeInputTrigger', {'hiddenFreeInput': currentInput})
.autoCompleteDaemon('initFocusSearchBar');
if (firstInit) {
const initCode = currentAutoComplete.siblings(postalCodeInputSelector).val();
if (initCode) {
currentAutoComplete.autoCompleteDaemon('setValue', {
'id': initCode,
'text': initCode,
});
}
}
});
firstInit = false;
}).change();
});
$(document).ready(function() {
$('.iconcaptcha-holder').iconCaptcha({
general: {
validationPath: '/cdn/vendor/icon-captcha/3.1.1/src/captcha-request.php', // required, change path according to your installation.
fontFamily: 'Arial',
credits: 'show',
},
security: {
clickDelay: 500,
hoverDetection: true,
enableInitialMessage: true,
initializeDelay: 500,
selectionResetDelay: 3000,
loadingAnimationDelay: 1000,
invalidateTime: 1000 * 60 * 2, // 2 minutes, in milliseconds
},
messages: {
initialization: {
verify: 'Cliquez ici pour vérifier',
loading: 'Chargement...'
},
header: 'Sélectionnez le type d\'image affichée le moins de fois',
correct: 'Vérification terminée',
incorrect: {
title: 'Uh oh.',
subtitle: 'Vous avez sélectionné la mauvaise image'
},
timeout: {
title: 'Veuillez patienter 60 secondes',
subtitle: 'Vous avez effectué trop de sélections incorrectes'
}
}
});
});
function SavingFiles(file) {
let idFile = file.attr('id');
let maxFileSize = 2.048;
let fileSize = (file.prop('files')[0].size / 1000000).toFixed(3);
let fileExtensionAllowed = [];
//We take all the extensions (from array_keys($t_cv_auth_typemime)) and add them to the JQuery array
fileExtensionAllowed.push('docx');
fileExtensionAllowed.push('doc');
fileExtensionAllowed.push('pdf');
fileExtensionAllowed.push('txt');
fileExtensionAllowed.push('odt');
fileExtensionAllowed.push('rtf');
//If the div does not exist then it is created. This avoids duplication
if ($('#error_file_' + idFile).length === 0) {
$('').attr({
id: 'error_file_' + idFile,
class: 'text-danger',
type: 'hidden'
}).insertAfter(file);
}
//We empty the div at each file call to avoid getting the same message twice.
$('#error_file_' + idFile).empty();
//If the extension and size are not suitable
if (($.inArray(file.val().split('.').pop().toLowerCase(), fileExtensionAllowed) === -1) && fileSize > maxFileSize) {
$('#error_file_' + idFile).html('les seuls formats autorisés sont :' + ' ' + fileExtensionAllowed.join(', ') + '.' + '
' +
'le fichier doit être inférieur à' + ' ' + maxFileSize + ' Mo.').fadeIn(500);
file.val('');
}
//If the size fits but the extension does not
if (($.inArray(file.val().split('.').pop().toLowerCase(), fileExtensionAllowed) === -1) && fileSize <= maxFileSize) {
$('#error_file_' + idFile).html('les seuls formats autorisés sont :' + ' ' + fileExtensionAllowed.join(', ') + '.').fadeIn(500);
file.val('');
}
//If the extension fits but the size does not
if (($.inArray(file.val().split('.').pop().toLowerCase(), fileExtensionAllowed) !== -1) && fileSize > maxFileSize) {
$('#error_file_' + idFile).html('le fichier doit être inférieur à' + ' ' + maxFileSize + ' Mo.').fadeIn(500);
file.val('');
}
// If the extension and size are suitable
if (($.inArray(file.val().split('.').pop().toLowerCase(), fileExtensionAllowed) !== -1) && fileSize < maxFileSize) {
//On envoie au script Ajax le fichier
let fileData = file.prop('files')[0];
let formData = new FormData();
formData.append('file', fileData);
$.ajax({
url: 'https://recrutement.chronopost.fr/_xhr' + '/fileUpload.php',
data: formData,
dataType: 'json',
type: 'post',
//Options to tell jQuery not to process data or worry about content-type.
cache: false,
contentType: false,
processData: false,
//A spinner is added during the file process
beforeSend: function() {
$('
').attr({
class: 'text-info',
id: 'spinner_' + idFile,
role: 'status'
}).
insertAfter(file).
append('
chargement en cours...');
},
//When the process is finished, we hide the spinner
complete: function () {
$('#spinner_' + idFile).hide();
},
success: function (data) {
fileSaveSuccess(data, file, idFile);
},
error: function (data) {
$('#error_file_' + idFile).html('erreur durant le chargement du fichier...');
$('#' + idFile).val('');
}
});
}
}
function fileSaveSuccess(data, file, idFile) {
const forceAddButton = data.forceAdd || false;
//Hiding the initial button located next to the file
$('#clear_' + idFile.substring(0, 2).toLowerCase()).hide();
let redirectOnDelete = false;
if (file.hasClass('file-controller')) {
if (forceAddButton) {
file.data('initForceAdd', true);
}
else if (file.data('initForceAdd')) {
redirectOnDelete = true;
}
}
//New button that will be next to the new display
let deleteButtonTitle = 'annuler';
let iconClass = 'fa-trash';
if (forceAddButton) {
deleteButtonTitle = 'ajouter un nouveau';
iconClass = 'fa-plus';
}
else if (redirectOnDelete) {
iconClass = 'fa-pencil';
deleteButtonTitle = 'gérer modification / suppression';
}
$('')
);
$('.password-eye-' + id).append($('
Afficher'));
})
}
//this function adds all the requirements that the password must fulfill
function addFrontPasswordRequirements(pwdId) {
if ($('#password-check-requirements-list-' + pwdId).length === 0) {
$('
').attr({
class: 'input-group check-password-requirements-' + pwdId,
id: 'password-check-requirements-list-' + pwdId
}).appendTo('#password-requirements-' + pwdId).show();
$('
').attr({
class: 'list-group',
id: 'password-requirements-list-' + pwdId,
style: 'font-size: 75%'
}).appendTo('#password-check-requirements-list-' + pwdId).show();
$('#password-requirements-list-' + pwdId).append('- Au moins 12 caractères
');
$('#password-requirements-list-' + pwdId).append('- Au moins 1 minuscule
');
$('#password-requirements-list-' + pwdId).append('- Au moins 1 majuscule
');
$('#password-requirements-list-' + pwdId).append('- Au moins 1 chiffre
');
$('#password-requirements-list-' + pwdId).append('- Au moins 1 caractère spécial parmi :
[!#$@%&*+=?()|§] ');
}
if ($('#' + pwdId).val().length === 0) {
$('.check-password-requirements-' + pwdId).remove();
}
}
//this function allows us to see the password by clicking on the eye
function passwordVisibility() {
let password = $('.password-policy');
if (password.attr('type') === "password") {
password.attr('type', 'text');
}
else {
password.attr('type', 'password');
}
}
//if a criteria is fulfilled, it becomes green
function passwordCheckAll(pwdId) {
let password = $('#' + pwdId).val();
let length = $('#lengthPassword-' + pwdId);
let lowercase = $('#lowercasePassword-' + pwdId);
let uppercase = $('#uppercasePassword-' + pwdId);
let number = $('#numberPassword-' + pwdId);
let special = $('#specialPassword-' + pwdId);
let password_length_recommended = 12;
let regex = '[!#$@%&*+=?()|§]';
password.length >= password_length_recommended ? length.addClass('list-group-item list-group-item-success') : length.removeClass('list-group-item-success');
/[a-zà-ý]/.test(password) ? lowercase.addClass('list-group-item list-group-item-success') : lowercase.removeClass('list-group-item-success');
/[A-ZÀ-Ý]/.test(password) ? uppercase.addClass('list-group-item list-group-item-success') : uppercase.removeClass('list-group-item-success');
/[0-9]/.test(password) ? number.addClass('list-group-item list-group-item-success') : number.removeClass('list-group-item-success');
password.match(new RegExp(regex)) ? special.addClass('list-group-item list-group-item-success') : special.removeClass('list-group-item-success');
}
function getRandomNum(lbound, ubound) {
return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
}
function getRandomLowercase() {
return "abcdefghijklmnopqrstuvwxyz".charAt(getRandomNum(0, "abcdefghijklmnopqrstuvwxyz".length - 1));
}
function getRandomUppercase() {
return "ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(getRandomNum(0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ".length - 1));
}
function getRandomSpecialChar() {
let specialChars = '[!#$@%&*+=?()|§]';
return specialChars.charAt(getRandomNum(0, specialChars.length - 1));
}
function getRandomChar() {
let lowerChars = "abcdefghijklmnopqrstuvwxyz";
let numberChars = "0123456789";
let upperChars = lowerChars.toUpperCase();
let specialChars = '[!#$@%&*+=?()|§]';
let charSet = "";
charSet += lowerChars;
charSet += numberChars;
charSet += upperChars;
charSet += specialChars;
return charSet.charAt(getRandomNum(0, charSet.length));
}
//this function generates a password that matches all the criteria
function getPassword(length) {
let numberChars = new RegExp('[0-9]');
let lowerChars= new RegExp('[a-z]');
let upperChars= new RegExp('[A-Z]');
let specialChars = '[!#$@%&*+=?()|§]';
let rc = "";
if (length > 0) {
rc += getRandomChar();
}
for (let idx = 1; idx < length; ++idx) {
rc += getRandomChar();
}
if (!rc.match(numberChars)) {
rc += getRandomNum(0, 9);
}
if (!rc.match(lowerChars)) {
rc += getRandomLowercase();
}
if (!rc.match(upperChars)) {
rc += getRandomUppercase();
}
if (!rc.match(specialChars)) {
rc += getRandomSpecialChar();
}
return rc;
}
//this function generates a password and then puts it in the different inputs
function generate_pwd(form_name, id) {
let generate = getPassword(12);
document.getElementById(form_name).elements[id].value = generate;
document.getElementById(form_name).elements['generate'].value = generate;
document.getElementById(form_name).elements[id].focus();
}
propulsé par Eqwa | plan de site