diff --git a/app/views/generic_projects/_form.html.erb b/app/views/generic_projects/_form.html.erb index 4030dcc29870bec379b1c97e9671c1d3873b59b1..75f5917c4f41a73251c20a9786e839fae2a837c3 100644 --- a/app/views/generic_projects/_form.html.erb +++ b/app/views/generic_projects/_form.html.erb @@ -2,7 +2,7 @@ function check_proposer_guide() { $('.proposer-guide').hide(); let curval = parseInt($(this).val()); - let selectbox = $('#project_course_edition_id-selectized'); + let selectbox = $('#generic_project_course_edition_id-selectized'); if (selectbox.length != 0) { if (!isNaN(curval)) { $('#proposer-guide-' + curval).show(); @@ -15,14 +15,14 @@ } $(document).on('turbolinks:load', function() { - let element = $('#project_course_edition_id'); + let element = $('#generic_project_course_edition_id'); element.change(check_proposer_guide); element.trigger("change"); - $('#project_course_edition_id-selectized').attr('required', 'true'); + $('#generic_project_course_edition_id-selectized').attr('required', 'true'); }); - let element = $('#project_course_edition_id'); + let element = $('#generic_project_course_edition_id'); element.change(check_proposer_guide); element.trigger("change"); </script> diff --git a/app/views/internships/_form.html.erb b/app/views/internships/_form.html.erb index 218ef4b62ad4559523d105ad1d37b4a3f4d16da5..ca52fda2386229bf1df9c33d4ab15c8898b9a6ba 100644 --- a/app/views/internships/_form.html.erb +++ b/app/views/internships/_form.html.erb @@ -2,7 +2,7 @@ function check_proposer_guide() { $('.proposer-guide').hide(); let curval = parseInt($(this).val()); - let selectbox = $('#project_course_edition_id-selectized'); + let selectbox = $('#internship_course_edition_id-selectized'); if (selectbox.length != 0) { if (!isNaN(curval)) { $('#proposer-guide-' + curval).show(); @@ -15,14 +15,14 @@ } $(document).on('turbolinks:load', function() { - let element = $('#project_course_edition_id'); + let element = $('#internship_course_edition_id'); element.change(check_proposer_guide); element.trigger("change"); - $('#project_course_edition_id-selectized').attr('required', 'true'); + $('#internship_course_edition_id-selectized').attr('required', 'true'); }); - let element = $('#project_course_edition_id'); + let element = $('#internship_course_edition_id'); element.change(check_proposer_guide); element.trigger("change"); </script>