SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 0411c571 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Debug submission form

parent 592be1b4
No related branches found
No related tags found
No related merge requests found
$(document).ready(function(){
$('select#id_submitted_to').on('change', function (){
var selection = $(this).val();
$("#id_proceedings, #id_submission_type").parents('.form-group').hide()
switch(selection){
case "{{ id_SciPostPhys }}":
$("#id_submission_type").parents('.form-group').show()
break;
case "{{ id_SciPostPhysProc }}":
$("#id_proceedings").parents('.form-group').show()
break;
}
}).trigger('change');
});
......@@ -11,7 +11,23 @@
{% endblock %}
{% block footer_script %}
<script type="text/javascript" src="{% static 'scipost/submission-form.js' %}"></script>
<script type="text/javascript" nonce="{{ request.csp_nonce }}">
$(document).ready(function(){
$('select#id_submitted_to').on('change', function (){
var selection = $(this).val();
$("#id_proceedings, #id_submission_type").parents('.form-group').hide()
switch(selection){
case "{{ id_SciPostPhys }}":
$("#id_submission_type").parents('.form-group').show()
break;
case "{{ id_SciPostPhysProc }}":
$("#id_proceedings").parents('.form-group').show()
break;
}
}).trigger('change');
});
</script>
{% endblock %}
{% block content %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment