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

27 lines
663 B
JavaScript
Raw Normal View History

2018-10-02 16:59:30 +02:00
/* globals $ */
2017-03-30 17:00:35 +02:00
$(document).on('turbolinks:load', button_edit_procedure_init);
2016-08-24 11:40:53 +02:00
2018-10-02 16:59:30 +02:00
function button_edit_procedure_init() {
2017-04-04 16:15:33 +02:00
buttons_api_carto();
button_individual();
2016-08-24 11:40:53 +02:00
}
2018-10-02 16:59:30 +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'))
2018-10-02 16:59:30 +02:00
$('#modules-api-carto').show();
2016-08-24 11:40:53 +02:00
}
2018-10-02 16:59:30 +02:00
function button_individual() {
$('#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'))
2018-10-02 16:59:30 +02:00
$('#individual-with-siret').show();
2017-03-30 17:00:35 +02:00
}