From: Yoan Le Clanche Date: Wed, 20 Nov 2019 10:43:05 +0000 (+0100) Subject: Add fascicule field https://trackers.pilotsystems.net/probarreau/0602 X-Git-Tag: 1.4.1~5^2~12^2~2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a84da97bc8a534bed951251b0af6d5f269565112;p=teleforma.git Add fascicule field https://trackers.pilotsystems.net/probarreau/0602 --- diff --git a/teleforma/templates/registration/registration_form.html b/teleforma/templates/registration/registration_form.html index 7c0ef465..e4771902 100644 --- a/teleforma/templates/registration/registration_form.html +++ b/teleforma/templates/registration/registration_form.html @@ -149,11 +149,20 @@ } } + function updateFascicule() { + var platformOnly = $("[name='platform_only']").val() === 'True' ? true : false; + if(platformOnly) + $("[name='fascicule']").parent().show(); + else + $("[name='fascicule']").parent().hide(); + } + $(document).ready(function () { trainingId = $("#id_training").val(); updateTrainings(); $("#id_period, #id_platform_only").change(updateTrainings); - + updateFascicule(); + $("[name='platform_only']").change(updateFascicule); });