PeerReviewsSelector.handlebars 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <div class="form-column-left">
  2. {{#t 'peer_reviews_header'}}Peer Reviews{{/t}}
  3. </div>
  4. <div class="form-column-right">
  5. <div class="border border-trbl border-round">
  6. <label class="checkbox flush" for="assignment_peer_reviews">
  7. {{checkbox "peer_reviews"
  8. id="assignment_peer_reviews"
  9. prefix=prefix
  10. checked=peerReviews
  11. aria-controls="peer_reviews_details"
  12. disabled=peerReviewsFrozen}}
  13. {{#t "labels.require_peer_reviews"}}Require Peer Reviews{{/t}}
  14. </label>
  15. <div id="peer_reviews_details"
  16. aria-expanded="{{peerReviews}}"
  17. style="{{hiddenUnless peerReviews}}">
  18. <div class="nested">
  19. <div class="subtitle">
  20. <strong>
  21. {{#t 'how_to_peer_review'}}How to Assign Peer Reviews{{/t}}
  22. </strong>
  23. </div>
  24. <label class="radio" for="assignment_manual_peer_reviews">
  25. <input name="{{#if nested}}assignment[automatic_peer_reviews]{{else}}automatic_peer_reviews{{/if}}"
  26. id="assignment_manual_peer_reviews"
  27. type="radio"
  28. value="0"
  29. aria-controls="automatic_peer_reviews_options"
  30. {{checkedUnless automaticPeerReviews}}
  31. {{disabledIfIncludes frozenAttributes "peer_reviews"}}/>
  32. {{#t "labels.manually_assign_peer_reviews"}}
  33. Manually Assign Peer Reviews
  34. {{/t}}
  35. </label>
  36. <label class="radio" for="assignment_automatic_peer_reviews">
  37. <input name="{{#if nested}}assignment[automatic_peer_reviews]{{else}}automatic_peer_reviews{{/if}}"
  38. id="assignment_automatic_peer_reviews"
  39. type="radio"
  40. value="1"
  41. aria-controls="automatic_peer_reviews_options"
  42. {{checkedIf automaticPeerReviews}}
  43. {{disabledIfIncludes frozenAttributes "peer_reviews"}}/>
  44. {{#t "labels.automatically_assign_peer_reviews"}}
  45. Automatically Assign Peer Reviews
  46. {{/t}}
  47. </label>
  48. <div id="automatic_peer_reviews_options"
  49. aria-enabled="{{automaticPeerReviews}}"
  50. style="{{hiddenUnless automaticPeerReviews}}">
  51. <label for="assignment_peer_review_count">
  52. {{#t "reviews_per_user"}}Reviews Per User{{/t}}
  53. </label>
  54. <input id="assignment_peer_review_count"
  55. name="{{#if nested}}assignment[peer_review_count]{{else}}peer_review_count{{/if}}"
  56. value="{{n peerReviewCount}}"
  57. type="text"
  58. {{disabledIfIncludes frozenAttributes "peer_reviews"}}/>
  59. <label for="assignment_peer_reviews_assign_at">
  60. {{#t "locked_until"}}Assign Reviews{{/t}}
  61. </label>
  62. <div class='date_field_container'>
  63. <label class='screenreader-only' id='assign_peer_review_at_accessible_label'>
  64. {{#t}}Assign Reviews on Date{{/t}}
  65. {{datepickerScreenreaderPrompt}}
  66. </label>
  67. <input id="assignment_peer_reviews_assign_at"
  68. name="{{#if nested}}assignment[peer_reviews_assign_at]{{else}}peer_reviews_assign_at{{/if}}"
  69. class="date_field datetime_field hasDatePicker"
  70. value="{{datetimeFormatted peerReviewsAssignAt}}"
  71. type="text"
  72. aria-labelledby="assign_peer_review_at_accessible_label"
  73. aria-describedby="peer_reviews_assign_at_explanation"
  74. data-tooltip
  75. title="{{accessibleDateFormat}}"
  76. {{disabledIfIncludes frozenAttributes "peer_reviews"}}/>
  77. </div>
  78. <div id="peer_reviews_assign_at_explanation" class="explanation nest">
  79. {{#t "peer_reviews_assign_at_explanation"}}
  80. Must come after due date. If blank, uses due date.
  81. {{/t}}
  82. </div>
  83. <div id="intra_group_peer_reviews_toggle"
  84. aria-enabled="{{hasGroupCategory}}"
  85. style="{{hiddenUnless hasGroupCategory}}">
  86. <label class="checkbox" for="intra_group_peer_reviews">
  87. {{checkbox "intra_group_peer_reviews"
  88. id="intra_group_peer_reviews"
  89. aria-controls="intra_group_peer_reviews"
  90. checked=intraGroupPeerReviews
  91. prefix=prefix}}
  92. {{#t}}
  93. Allow intra-group peer reviews
  94. {{/t}}
  95. </label>
  96. </div>
  97. </div>
  98. </div>
  99. {{#unless hideAnonymousPeerReview}}
  100. <div class="nested">
  101. <div class="subtitle">
  102. <strong>
  103. {{#t 'anonymous_peer_reviews'}}Anonymity{{/t}}
  104. </strong>
  105. </div>
  106. <label class="checkbox" for="anonymous_peer_reviews">
  107. {{checkbox "anonymous_peer_reviews"
  108. checked=anonymousPeerReviews
  109. id="anonymous_peer_reviews"
  110. aria-controls="anonymous_peer_reviews"
  111. prefix=prefix
  112. disabled=peerReviewsFrozen}}
  113. {{#t "labels.anonymous_peer_reviews"}}
  114. Peer Reviews Appear Anonymously
  115. {{/t}}
  116. </label>
  117. </div>
  118. {{/unless}}
  119. </div>
  120. </div>
  121. </div>