-
-
Save sofixa/be2e575cf8a198c1cf89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (uri_string() === "fr/inscription/programmateur") | |
{ | |
?> | |
<script src='https://fuelcdn.com/fuelux/2.3/loader.min.js'></script> | |
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script> | |
<script src='<?php echo site_url("assets/js/lib/bootstrapValidator.min.js");?>'></script> | |
<script src="<?php echo site_url("assets/js/lib/jquery.ui.datepicker-fr.js");?>"></script> | |
<script> | |
$.datepicker.setDefaults($.datepicker.regional["fr"]); | |
</script> | |
<script> | |
$('#MyWizard').on('finished', function(e, data) { | |
console.log('finished'); | |
}); | |
$('#btnWizardPrev').on('click', function() { | |
$('#MyWizard').wizard('previous'); | |
}); | |
$('#btnWizardNext').on('click', function() { | |
$('#MyWizard').wizard('next','foo'); | |
}); | |
</script> | |
<script> | |
$(document).ready(function() { | |
$('.more-info').popover({ | |
html: 'true', | |
trigger: 'click', | |
placement: 'right', | |
title: "<?=lang('signup.gen.popover_title')?>", | |
content: function(){ | |
return $(this).data('content'); | |
} | |
}); | |
$('.more-info').addClass('btn btn-sm'); | |
$('.more-info').attr('data-tooltip', 'tooltip'); | |
$('.more-info').attr('title', "<?=lang('signup.incl.tooltip')?>"); | |
$('body').tooltip({ | |
selector: "[data-tooltip=tooltip]", | |
container: 'body' | |
}); | |
}); | |
</script> | |
<script> | |
var pageImages = []; | |
var pageNum = 1; | |
/** | |
* Reset numbering on tab buttons | |
*/ | |
function reNumberPages() { | |
pageNum = 1; | |
var tabCount = $('#pageTab > li').length; | |
$('#pageTab > li').each(function() { | |
var pageId = $(this).children('a').attr('href'); | |
if (pageId == "#page1") { | |
return true; | |
} | |
pageNum++; | |
$(this).children('a').html('Contact ' + pageNum + | |
'<button class="close" type="button" ' + | |
'title="<?=lang('signup.incl.tooltip1')?>">×</button>'); | |
}); | |
} | |
$(document).ready(function() { | |
/** | |
* Add a Tab | |
*/ | |
$('#btnAddPage').click(function() { | |
pageNum++; | |
$('#pageTab').append( | |
$('<li><a href="#page' + pageNum + '">' + | |
'Contact ' + pageNum + | |
'<button class="close" type="button" ' + | |
'title="<?=lang('signup.incl.tooltip1')?>">×</button>' + | |
'</a></li>')); | |
var content = $('#page1').html(); | |
$('#pageTabContent').append( | |
$('<div class="tab-pane" id="page' + pageNum + '">' + content + '</div>')); | |
$('#page' + pageNum).tab('show'); | |
if(!$('#page' + pageNum + ' .env_info').hasClass('hidden')) | |
$('#page' + pageNum + ' .env_info').addClass('hidden'); | |
$('.more-info').popover({ | |
html: 'true', | |
trigger: 'click', | |
placement: 'right', | |
title: "Plus d'infos" | |
}); | |
$('#page' + pageNum + ' input').each(function() { | |
this.id = this.id.replace('1', pageNum); | |
$('#signupProgrammer').bootstrapValidator('addField', this.name, { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}); | |
$('#signupProgrammer').bootstrapValidator('revalidateField', this.name); | |
}); | |
}); | |
/** | |
* Remove a Tab | |
*/ | |
$('#pageTab').on('click', ' li a .close', function() { | |
var tabId = $(this).parents('li').children('a').attr('href'); | |
$(this).parents('li').remove('li'); | |
$(tabId).remove(); | |
reNumberPages(); | |
$('#pageTab a:first').tab('show'); | |
}); | |
/** | |
* Click Tab to show its content | |
*/ | |
$("#pageTab").on("click", "a", function(e) { | |
e.preventDefault(); | |
$(this).tab('show'); | |
}); | |
}); | |
</script> | |
<script type="text/javascript"> | |
$('#pageTabContent').on("change", ".personne_filtre", (function() { | |
if ($(this).prop('checked') == true) | |
$(this).parents('.tab-pane').children('.env_info').removeClass('hidden'); | |
else | |
$(this).parents('.tab-pane').children('.env_info').addClass('hidden'); | |
})); | |
$('.sys_info').change(function() { | |
if ($(this).val() == "Windows") | |
{ | |
$(this).next('.info_msg_windows').removeClass('hidden'); | |
$(this).next('.info_msg_mac').addClass('hidden'); | |
$(this).next('.info_msg_linux').addClass('hidden'); | |
} | |
else if ($(this).val() == "Mac OS X") | |
{ | |
$(this).next('.info_msg_mac').removeClass('hidden'); | |
$(this).next('.info_msg_windows').addClass('hidden'); | |
$(this).next('.info_msg_linux').addClass('hidden'); | |
} | |
else | |
{ | |
$(this).next('.info_msg_linux').removeClass('hidden'); | |
$(this).next('.info_msg_windows').addClass('hidden'); | |
$(this).next('.info_msg_mac').addClass('hidden'); | |
} | |
}); | |
</script> | |
<script> | |
$('.radios').on('click', function() { | |
if ($(this).val() == '1' || $(this).val() == '3') | |
{ | |
$('.popover_filtre').each(function() { | |
$(this).popover('hide'); | |
$(this).data('content', $(this).data('content1')); | |
}); | |
$('.type_dim_plateau').popover('hide'); | |
$('.type_dim_plateau').hide(); | |
} | |
else | |
{ | |
$('.popover_filtre').each(function() { | |
$(this).popover('hide'); | |
$(this).data('content', $(this).data('content2')); | |
}); | |
$('.type_dim_plateau').show(); | |
} | |
}); | |
</script> | |
<script> | |
$('.periode').datepicker({ | |
numberOfMonths: 2 | |
}); | |
$('#periode_aucun').on('change', function() { | |
if ($(this).prop('checked') == true) | |
{ | |
$('.periode_autre').removeAttr('checked'); | |
$('.periode_autre').attr("disabled", true); | |
} | |
else | |
$('.periode_autre').removeAttr('disabled'); | |
}); | |
function periode_autre() { | |
if ($('#cat_spe4').prop('checked') == true) | |
{ | |
$('#uncheckCat_spe').html("<?=lang('signup.prog.uncheckCat_spe')?>"); | |
$('.cat_spe_autre').removeAttr('checked'); | |
$('.cat_spe_autre').attr("disabled", true); | |
} | |
else | |
$('.cat_spe_autre').removeAttr('disabled'); | |
}; | |
function public_autre() { | |
if ($('#cat_spe_public3').prop('checked') == true) | |
{ | |
$('#uncheckCat_spe_public').html("<?=lang('signup.prog.uncheckCat_spe_public')?>"); | |
$('.cat_spe_public_autre').removeAttr('checked'); | |
$('.cat_spe_public_autre').attr("disabled", true); | |
} | |
else | |
$('.cat_spe_public_autre').removeAttr('disabled'); | |
}; | |
function structure_rel_contractuelle_autre() { | |
if ($('#struct_rel_contractuelle1').prop('checked') == true) | |
{ | |
if ('#checkbox_cession'.checked) | |
$('#div_price_cession').hide(); | |
else | |
$('#div_price_cession').show(); | |
$('#confirmInfo_finance').html("<?=lang('signup.prog.confirmInfo_finance')?>"); | |
$('.structure_rel_contractuelle_autre').removeAttr('checked'); | |
$('.structure_rel_contractuelle_autre').attr("disabled", true); | |
} | |
else | |
$('.structure_rel_contractuelle_autre').removeAttr('disabled'); | |
}; | |
</script> | |
<script type="text/javascript"> | |
$('.cat_spe_programmer').on('click', function() { | |
periode_autre(); | |
if (this.checked) | |
$('#uncheckCat_spe').html($('#uncheckCat_spe').html() + $(this).data('cat_spe') + ', '); | |
else | |
$('#uncheckCat_spe').html($('#uncheckCat_spe').html().replace($(this).data('cat_spe') + ', ', "")); | |
}); | |
$('.cat_spe_public').on('click', function() { | |
public_autre(); | |
if (this.checked) | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html() + $(this).data('cat_spe_public') + ', '); | |
else | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html().replace($(this).data('cat_spe_public') + ', ', "")); | |
if ($('#cat_spe_public1').is(':checked')) | |
$("#public_age_max").removeAttr('disabled'); | |
else | |
{ | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html().replace($('#cat_spe_public1').data('cat_spe_public') + ' ' + $($('#public_age_max')).val() + " <?=lang('signup.gen.ans')?>, ", '')); | |
old_age_max = 0; | |
$("#public_age_max").val(''); | |
$("#public_age_max").attr('disabled', 'disabled'); | |
} | |
if ($('#cat_spe_public2').is(':checked')) | |
$("#public_age_min").removeAttr('disabled'); | |
else | |
{ | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html().replace($('#cat_spe_public2').data('cat_spe_public') + ' ' + $($('#public_age_min')).val() + " <?=lang('signup.gen.ans')?>, ", '')); | |
old_age_min = 0; | |
$("#public_age_min").val(''); | |
$("#public_age_min").attr('disabled', 'disabled'); | |
} | |
}); | |
var old_age_max = 0; | |
$('#public_age_max').on('change', function() { | |
if ($('#cat_spe_public1').is(':checked') && old_age_max == 0) | |
{ | |
old_age_max = $('#public_age_max').val(); | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html().replace($('#cat_spe_public1').data('cat_spe_public') + ', ', $('#cat_spe_public1').data('cat_spe_public') + ' ' + $($('#public_age_max')).val() + " <?=lang('signup.gen.ans')?>"+', ')); | |
} | |
else if ($('#cat_spe_public1').is(':checked')) | |
{ | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html().replace($('#cat_spe_public1').data('cat_spe_public') + ' ' + old_age_max + " <?=lang('signup.gen.ans')?>, ", $('#cat_spe_public1').data('cat_spe_public') + ' ' + $($('#public_age_max')).val() + " <?=lang('signup.gen.ans')?>"+', ')); | |
old_age_max = $('#public_age_max').val(); | |
} | |
}); | |
var old_age_min = 0; | |
$('#public_age_min').on('change', function() { | |
if ($('#cat_spe_public2').is(':checked') && old_age_min == 0) | |
{ | |
old_age_min = $('#public_age_min').val(); | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html().replace($('#cat_spe_public2').data('cat_spe_public') + ', ', $('#cat_spe_public2').data('cat_spe_public') + ' ' + $($('#public_age_min')).val() + " <?=lang('signup.gen.ans')?>"+', ')); | |
} | |
else if ($('#cat_spe_public2').is(':checked')) | |
{ | |
$('#uncheckCat_spe_public').html($('#uncheckCat_spe_public').html().replace($('#cat_spe_public2').data('cat_spe_public') + ' ' + old_age_min + " <?=lang('signup.gen.ans')?>, ", $('#cat_spe_public2').data('cat_spe_public') + ' ' + $($('#public_age_min')).val() + " <?=lang('signup.gen.ans')?>"+', ')); | |
old_age_min = $('#public_age_min').val(); | |
} | |
}); | |
</script> | |
<script> | |
var Pname_Sgenre_selected, Pgenre_selected = 0; | |
$('#genreTable td').on('click', function() { | |
if (!($(this).hasClass('success'))) | |
{ | |
$(this).addClass('success'); | |
$('#genreTable_' + $(this).data('genre')).addClass('hidden'); | |
$('#confirmGenre').html($('#confirmGenre').html() + $(this).html() + ', '); | |
} | |
else | |
{ | |
$(this).removeClass('success'); | |
$('#genreTable_' + $(this).data('genre')).removeClass('hidden'); | |
$('#confirmGenre').html($('#confirmGenre').html().replace($(this).html() + ', ', '')); | |
} | |
}); | |
$('.sous-genres td').on('click', function() { | |
if (!($(this).hasClass('success'))) | |
{ | |
$(this).addClass('success'); | |
$('#confirmSGenre').html($('#confirmSGenre').html() + $(this).html() + ', '); | |
} | |
else | |
{ | |
$(this).removeClass('success'); | |
$('#confirmSGenre').html($('#confirmSGenre').html().replace($(this).html() + ', ', '')); | |
} | |
}); | |
$('#genreTable_Ingredients td').on('click', function() { | |
if (!($(this).hasClass('success'))) | |
{ | |
$(this).addClass('success'); | |
$('#checkIngredients').html($('#checkIngredients').html() + $(this).html() + ", "); | |
} | |
else | |
{ | |
$(this).removeClass('success'); | |
$('#checkIngredients').html($('#checkIngredients').html().replace($(this).html() + ", ", " ")); | |
} | |
}); | |
</script> | |
<script type="text/javascript"> | |
$('.structure_rel_contractuelle').on('click', function() { | |
structure_rel_contractuelle_autre(); | |
if (this.checked) | |
$('#confirmInfo_finance').html($('#confirmInfo_finance').html() + $(this).val() + ", "); | |
else | |
$('#confirmInfo_finance').html($('#confirmInfo_finance').html().replace($(this).val() + ", ", " ")); | |
}); | |
$('#checkbox_cession').on('click', function() { | |
if (this.checked) | |
$('#div_price_cession').hide(); | |
else | |
$('#div_price_cession').show(); | |
}); | |
</script> | |
<script> | |
$(function() { | |
$("#sortable1, #sortable2").sortable({ | |
connectWith: ".connectedSortable" | |
}).disableSelection(); | |
}); | |
</script> | |
<script> | |
$('.corp_mail').change(function() { | |
if (($(this).val() > 5) || ($(this).val() <= 0)) | |
$(this).val(''); | |
if (($(this).val() == $('#mail_pos_structure').val()) && ($(this).attr('id') != 'mail_pos_structure')) | |
$(this).val(''); | |
if (($(this).val() == $('#mail_pos_spectacle').val()) && ($(this).attr('id') != 'mail_pos_spectacle')) | |
$(this).val(''); | |
if (($(this).val() == $('#mail_pos_espace').val()) && ($(this).attr('id') != 'mail_pos_espace')) | |
$(this).val(''); | |
if (($(this).val() == $('#mail_pos_finance').val()) && ($(this).attr('id') != 'mail_pos_finance')) | |
$(this).val(''); | |
if (($(this).val() == $('#mail_pos_calendrier').val()) && ($(this).attr('id') != 'mail_pos_calendrier')) | |
$(this).val(''); | |
}); | |
</script> | |
<script type="text/javascript"> | |
$('.with_recap').change(function() { | |
$('#recap_' + $(this).attr('id')).html($(this).val()); | |
}); | |
var price_option = 0; | |
var abonnement = 0; | |
var price = 0; | |
var price_final = 0; | |
$('.with_recap_2').on('click', function() { | |
if ($(this).prop('checked') == true) | |
{ | |
if (($(this).attr('id') == 'filtre_un') || ($(this).attr('id') == 'filtre_deux') || ($(this).attr('id') == 'filtre_trois')) | |
abonnement = 79.90; | |
else if ($(this).attr('id') == 'moteur_de_recherche') | |
price_option += 49.90; | |
else if ($(this).attr('id') == 'acces_all_spec') | |
price_option += 79.90; | |
$('#recap_' + $(this).attr('id')).removeClass('hidden'); | |
} | |
else | |
{ | |
if ($(this).attr('id') == 'moteur_de_recherche') | |
price_option -= 49.90; | |
else if ($(this).attr('id') == 'acces_all_spec') | |
price_option -= 79.90; | |
$('#recap_' + $(this).attr('id')).addClass('hidden'); | |
} | |
price = (1*price_option.toFixed(1) + 1*abonnement.toFixed(1)); | |
$('#recap_total').html('<label><?=lang("signup.prog.tva1")?></label> : ' + price.toFixed(1) + '<?=lang("signup.incl.tva1")?>'); | |
$('#recap_tva').html('<label><?=lang("signup.prog.tva2")?></label>: ' + (price.toFixed(1) * 0.2).toFixed(1) + '<?=lang("signup.gen.euro")?>'); | |
price_final = (1*price.toFixed(1) + 1*(price* 0.2).toFixed(1)); | |
$('#recap_total_tva').html('<label><?=lang("signup.prog.tva3")?></label> : ' + (price_final).toFixed(1) + '<?=lang("signup.incl.tva2")?>'); | |
/* | |
afficher " prestation à l'export non soumise à la tva" si la structure n'est pas en france | |
*/ | |
}); | |
</script> | |
<script> | |
$( "input:radio" ).each(function() { | |
if ($(this).prop('checked') == false) | |
{ | |
if (!$(this).next().is(':radio')) | |
$(this).next().attr('disabled', true); | |
} | |
}); | |
$( "input:checkbox" ).each(function() { | |
if ($(this).prop('checked') == false) | |
{ | |
if (!$(this).next().is(':checkbox')) | |
$(this).next().attr('disabled', true); | |
} | |
}); | |
</script> | |
<script> | |
$(document).ready(function() { | |
$('#signupProgrammer').bootstrapValidator({ | |
excluded: ":disabled", | |
message: 'This value is not valid', | |
feedbackIcons: { | |
valid: 'glyphicon glyphicon-ok', | |
invalid: 'glyphicon glyphicon-remove', | |
validating: 'glyphicon glyphicon-refresh' | |
}, | |
fields: { | |
structure_nom: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
structure_site_web: { | |
validators: { | |
uri: { | |
message: "<?=lang('signup.valid.uri')?>" | |
} | |
} | |
}, | |
structure_tel: { | |
validators: { | |
callback: { | |
message: "<?=lang('signup.valid.notempty')?>", | |
callback: function() { | |
if (($('#structure_pays').val() == 'France') && $('#structure_tel').val().length != 10) | |
return (false); | |
else if ($('#structure_tel').val().length == 0) | |
return (false); | |
else if(!$.isNumeric($('#structure_tel').val())) | |
return (false); | |
else | |
return (true); | |
} | |
} | |
} | |
}, | |
structure_email: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
emailAddress: { | |
message: "<?=lang('signup.valid.email')?>" | |
} | |
} | |
}, | |
structure_ap: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
stringLength: { | |
min: 10, | |
message: "<?=lang('signup.valid.length')?>" | |
} | |
} | |
}, | |
structure_cp: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
stringLength: { | |
min: 5, | |
message: "<?=lang('signup.valid.length')?>" | |
}, | |
numeric: { | |
message: "<?=lang('signup.valid.numeric')?>" | |
} | |
} | |
}, | |
structure_ville: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
structure_siret: { | |
validators: { | |
stringLength: { | |
max: 15, | |
message: "<?=lang('signup.valid.length')?>" | |
} | |
} | |
},// --> Debut de la page 2 <-- | |
'personne_prenom[]': { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'personne_nom[]': { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'personne_tel[]': { | |
validators: { | |
callback: { | |
message: "<?=lang('signup.valid.notempty')?>", | |
callback: function(value, validator) { | |
if (($('#structure_pays').val() == 'France') && value.length != 10) | |
return (false); | |
else if (value.length == 0) | |
return (false); | |
else if (!$.isNumeric(value)) | |
return (false); | |
else | |
return (true); | |
} | |
} | |
} | |
}, | |
'personne_email[]': { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
emailAddress: { | |
message: "<?=lang('signup.valid.email')?>" | |
} | |
} | |
},// --> Debut de la page 3 <-- | |
filtre: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
nom_lieu_exploitation: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'type_lieu_accueil[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
personne_max: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
stringLength: { | |
max: 6, | |
message: "<?=lang('signup.valid.length')?>" | |
}, | |
numeric: { | |
message: "<?=lang('signup.valid.numeric')?>" | |
} | |
} | |
}, | |
structure_dim_plateau_ouverture: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
numeric: { | |
message: "<?=lang('signup.valid.numeric')?>" | |
} | |
} | |
}, | |
structure_dim_plateau_profondeur: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
numeric: { | |
message: "<?=lang('signup.valid.numeric')?>" | |
} | |
} | |
}, | |
structure_dim_plateau_hauteur: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
}, | |
numeric: { | |
message: "<?=lang('signup.valid.numeric')?>" | |
} | |
} | |
}, | |
'cat_spe[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
cat_spe_public: { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
public_age_max: { | |
validators: { | |
callback: { | |
message:"<?=lang('signup.valid.numeric')?>", | |
callback: function() { | |
if ($('#cat_spe_public1').is(':checked')) | |
{ | |
if(!$.isNumeric($('#public_age_max').val())) | |
return (false); | |
else | |
return (true); | |
} | |
else | |
return (true); | |
} | |
} | |
} | |
}, | |
public_age_min: { | |
validators: { | |
callback: { | |
message: "<?=lang('signup.valid.numeric')?>", | |
callback: function() { | |
if ($('#cat_spe_public2').is(':checked')) | |
{ | |
if(!$.isNumeric($('#public_age_min').val())) | |
return (false); | |
else | |
return (true); | |
} | |
else | |
return (true); | |
} | |
} | |
} | |
}, | |
'structure_rel_contractuelle[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
price_cession: { | |
validators: { | |
numeric: { | |
message: "<?=lang('signup.valid.numeric')?>" | |
}, | |
stringLength: { | |
max: 7, | |
message: "<?=lang('signup.valid.length')?>" | |
} | |
} | |
}, | |
option_autre_email1: { | |
validators: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
option_autre_email2: { | |
validator: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
valid_lst_critere: { | |
validators: { | |
callback: { | |
message: "<?=lang('signup.valid.length')?>", | |
callback: function(value, validator) { | |
if (value != 6) | |
return false; | |
else | |
return true; | |
} | |
} | |
} | |
}, | |
mail_pos_structure: { | |
validator: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'mail_structure[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
mail_pos_spectacle: { | |
validator: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'mail_spectacle[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
mail_pos_espace: { | |
validator: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'mail_espace[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
mail_pos_finance: { | |
validator: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'mail_finance[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
}, | |
mail_pos_calendrier: { | |
validator: { | |
notEmpty: { | |
message: "<?=lang('signup.valid.notempty')?>" | |
} | |
} | |
}, | |
'mail_calendrier[]': { | |
validators: { | |
choice: { | |
min: 1, | |
message: "<?=lang('signup.valid.choice')?>" | |
} | |
} | |
} | |
} | |
}); | |
}); | |
</script> | |
<script type="text/javascript"> | |
$("#sortable2").sortable({ | |
stop: function() { | |
$("#valid_lst_critere").val($('#sortable2 > *').length); | |
$('#signupProgrammer').bootstrapValidator('revalidateField', 'valid_lst_critere'); | |
} | |
}); | |
$("#sortable1").sortable({ | |
change: function() { | |
$("#valid_lst_critere").val($('#sortable2 > *').length); | |
$('#signupProgrammer').bootstrapValidator('revalidateField', 'valid_lst_critere'); | |
}, | |
stop: function() { | |
$("#valid_lst_critere").val($('#sortable2 > *').length); | |
$('#signupProgrammer').bootstrapValidator('revalidateField', 'valid_lst_critere'); | |
} | |
}); | |
</script> | |
<script> | |
$(document).ready(function() { | |
$('#validerPeriode').on('click', function() { | |
var check = []; | |
$('.structure_periode_exploitation_ind:input:checkbox:checked').each(function() { | |
check += $(this).val() + "<br />"; | |
}); | |
var content = '<tr data-num=' + $(this).data('num') + '><td>' + $(this).data('num') + '</td><td>' + $('#periode_exploitation_debut').val() + '</td><td>' + $('#periode_exploitation_fin').val() + '</td><td>' + check + '</td><td><button type="button" class="btn btn-default btn-danger deletePeriode" ><i class="glyphicon glyphicon-trash"></i></button></td></tr>'; | |
$('#tablePeriodes').append(content); | |
$('#confirmPeriode_exploitation').append("<input class='date_value_" + $(this).data().num + " 'id='" + $('#periode_exploitation_debut').val() + "' value='" + $('#periode_exploitation_debut').val() + "' disabled>"); | |
$('#confirmPeriode_exploitation').append("<input class='date_value_" + $(this).data().num + " 'id='" + $('#periode_exploitation_fin').val() + "' value='" + $('#periode_exploitation_fin').val() + "' disabled>"); | |
$('#confirmPeriode_exploitation').append("<input class='date_value_" + $(this).data().num + " 'id='" + check + "' value='" + check + "' disabled>"); | |
$(this).data().num++; | |
$('#periode_exploitation_debut').val(""); | |
$('#periode_exploitation_fin').val(""); | |
$('.structure_periode_exploitation_ind:input:checkbox:checked').each(function() { | |
$(this).removeAttr('checked'); | |
$('.periode_autre').attr("disabled", false); | |
}); | |
}); | |
$("#tablePeriodes").on("click", ".deletePeriode", function() { | |
var tr = $(this).closest('tr'); | |
$('.date_value_' + tr.data('num')).remove(); | |
tr.css("background-color","#FF3700"); | |
tr.fadeOut(400, function(){ | |
tr.remove(); | |
}); | |
return false; | |
}); | |
}); | |
</script> | |
<script> | |
$(".autocomplete_ville").autocomplete({ | |
source: function (request, response){ | |
$.ajax({ | |
dataType: "json", | |
url: "<?php echo base_url('api/geo/cities/get/'); ?>/" + request.term, | |
success: function (data) { | |
response(data); | |
} | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment