demarches-normaliennes/app/assets/javascripts/procedure.js

38 lines
892 B
JavaScript
Raw Normal View History

2017-03-30 17:00:35 +02:00
$(document).on('turbolinks:load', button_edit_procedure_init);
2016-08-24 11:40:53 +02:00
function button_edit_procedure_init(){
2017-04-04 16:15:33 +02:00
buttons_api_carto();
button_cerfa();
button_individual();
2016-08-24 11:40:53 +02:00
}
function buttons_api_carto () {
$("#procedure-module-api-carto-use-api-carto").on('change', function() {
$("#modules-api-carto").toggle()
2017-04-04 16:15:33 +02:00
});
if ($('#procedure-module-api-carto-use-api-carto').is(':checked'))
$("#modules-api-carto").show();
2016-08-24 11:40:53 +02:00
}
function button_cerfa () {
2017-04-04 16:15:33 +02:00
$("#procedure_cerfa_flag").on('change', function() {
$("#procedure-lien-demarche").toggle()
2017-04-04 16:15:33 +02:00
});
2016-08-24 11:40:53 +02:00
2017-04-04 16:15:33 +02:00
if ($('#procedure_cerfa_flag').is(':checked'))
$("#procedure-lien-demarche").show();
}
function button_individual () {
2017-04-04 16:15:33 +02:00
$("#procedure_for_individual").on('change', function() {
$("#individual-with-siret").toggle()
2017-04-04 16:15:33 +02:00
});
2017-04-04 16:15:33 +02:00
if ($('#procedure_for_individual').is(':checked'))
$("#individual-with-siret").show();
2017-03-30 17:00:35 +02:00
}