Commit 9c74d0e1 authored by Roland Denis's avatar Roland Denis
Browse files

Disable duration input field for job of type CDI

parent a2216c9d
Pipeline #4731 passed with stages
in 43 seconds
......@@ -55,7 +55,7 @@
<p><span class="error">Les informations obligatoires sont indiquées par une *.</span></p>
<form name="job_offer_form" enctype="multipart/form-data" method="post">
<p>
Type de l'offre* : <select name="job_type" required>
Type de l'offre* : <select name="job_type" onchange="update_duration_availability()" required>
{{ '
<option hidden disabled {% if not form.job_type %} selected {% endif %} value>Choisissez</option>
{% for key, value in job_type_list.items() %}
......@@ -136,10 +136,17 @@
forceSync: true,
hideIcons: ["image"],
});
function update_duration_availability() {
document.getElementsByName("duration")[0].disabled = (document.getElementsByName("job_type")[0].value == 'cdi');
}
update_duration_availability();
</script>
{{ ' {% endif %} ' }}
</div>
</div>
{% endblock content %}
\ No newline at end of file
{% endblock content %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment