]> git.parisson.com Git - teleforma.git/commitdiff
Add fascicule field https://trackers.pilotsystems.net/probarreau/0602
authorYoan Le Clanche <yoan@ellington.pilotsystems.net>
Wed, 20 Nov 2019 10:43:05 +0000 (11:43 +0100)
committerYoan Le Clanche <yoan@ellington.pilotsystems.net>
Wed, 20 Nov 2019 10:43:05 +0000 (11:43 +0100)
teleforma/templates/registration/registration_form.html

index 7c0ef465ef7ab775565ce6d650df5df5d8099c01..e477190243506aa4c90512fb4a9771047c315ce4 100644 (file)
         }
     }
 
+    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);
     });
 </script>
 <style>