From b57b883a5ba66f808152bf640f51b1f1075ffb2e Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Sun, 21 May 2017 19:24:10 +0200
Subject: [PATCH] Alter text in cycle-choose-form

---
 .../_form_submission_cycle_choice.html         | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/submissions/templates/submissions/_form_submission_cycle_choice.html b/submissions/templates/submissions/_form_submission_cycle_choice.html
index b7f18ec9e..9159c6abe 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>
-- 
GitLab