diff --git a/submissions/templates/submissions/_form_submission_cycle_choice.html b/submissions/templates/submissions/_form_submission_cycle_choice.html index b7f18ec9ef4ad9dc9361040e352d74ec15fb2b26..9159c6abe2f20a8a7de161f592163792fc3def02 100644 --- a/submissions/templates/submissions/_form_submission_cycle_choice.html +++ b/submissions/templates/submissions/_form_submission_cycle_choice.html @@ -65,13 +65,16 @@ </div> </div><!-- end reinvite referees --> </div> + <p data-cycle="default" class="mt-4" style="display: none;">You will also be able to invite other referees from the Editorial Page.</p> + <p data-cycle="short" class="mt-4" style="display: none;">You can only consult those referees in this short cycle; if you want to invite new referees, choose the Default cycle.</p> <input type="submit" class="btn btn-primary" value="Confirm choice"> </form> <script> $(function(){ $('[name="{{form.refereeing_cycle.name}}"]').on('click change', function(){ - var reinvite = $('[name="{{form.refereeing_cycle.name}}"]:checked').parents('.radio').attr('data-reinvite') == 1; + var element = $('[name="{{form.refereeing_cycle.name}}"]:checked'); + var reinvite = element.parents('.radio').attr('data-reinvite') == 1; // Show/hide invitation block if(reinvite > 0) { @@ -79,8 +82,17 @@ } else { $('#id_referees_reinvite_block').hide(); } - }).trigger('change'); - + // Show/hide help text + if(element.val() == 'default') { + $('[data-cycle="default"]').show(); + $('[data-cycle="short"]').hide(); + } else if(element.val() == 'short') { + $('[data-cycle="short"]').show(); + $('[data-cycle="default"]').hide(); + } else { + $('[data-cycle]').hide(); + } + }).trigger('change'); }); </script>