editCalendarEventFull.handlebars 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <h1 class="screenreader-only">
  2. {{#if newRecord}}{{#t "new_calendar_event_header"}}New Calendar Event{{/t}}
  3. {{else}}{{#t "edit_calendar_event_header"}}Edit Calendar Event{{/t}}{{/if}}
  4. </h1>
  5. <form id="editCalendarEventFull" class="{{#if use_section_dates}}use_section_dates{{/if}}">
  6. <input type="text"
  7. name="title"
  8. class="title input-block-level"
  9. aria-label="{{#t "event_title"}}Event Title{{/t}}"
  10. placeholder="{{#t "event_title"}}Event Title{{/t}}"
  11. value="{{title}}"
  12. maxlength="255" />
  13. <div class="clearfix pull-right">
  14. <a href="#" class="switch_event_description_view pull-right">
  15. {{#t "#editor.switch_editor_html"}}HTML Editor{{/t}}
  16. </a>
  17. <a href="#" class="switch_event_description_view pull-right" style="display:none;">
  18. {{#t "#editor.switch_editor_rich_text"}}Rich Content Editor{{/t}}
  19. </a>
  20. </div>
  21. <div style="clear:both;"></div>
  22. <textarea class="input-block-level"
  23. id="calendar-description"
  24. name="description"
  25. aria-label="{{#t "event_description"}}Event Description{{/t}}"
  26. style="width: 100%">{{description}}</textarea>
  27. {{#if course_sections}}
  28. <label class="label_with_checkbox" for="use_section_dates">
  29. {{checkbox "use_section_dates"}}
  30. {{#t "different_date_for_each_section"}}Use a different date for each section{{/t}}
  31. </label>
  32. <input type="hidden"
  33. name="remove_child_events"
  34. value="{{#unless use_section_dates}}1{{/unless}}" />
  35. {{/if}}
  36. <div class="hide_if_using_sections date_start_end_row">
  37. <table>
  38. <tbody>
  39. <tr>
  40. <td>
  41. <div class='date_field_container'>
  42. <label class='screenreader-only' id='calendar_event_date_accessible_label'>
  43. {{#t}}Event Date{{/t}}
  44. {{datepickerScreenreaderPrompt 'date'}}
  45. </label>
  46. <input type="text"
  47. name="start_date"
  48. class="date_field start_date"
  49. value="{start_date}"
  50. placeholder="{{#t "date"}}Date{{/t}}"
  51. aria-labelledby='calendar_event_date_accessible_label'
  52. data-tooltip title="{{accessibleDateFormat 'date'}}"/>
  53. </div>
  54. </td>
  55. <td>
  56. <div class='date_field_container'>
  57. <label class='screenreader-only' id='calendar_event_start_time_accessible_label'>
  58. {{#t}}Event Start Time{{/t}}
  59. {{datepickerScreenreaderPrompt 'time'}}
  60. </label>
  61. <input type="text"
  62. name="start_time"
  63. class="time_field start_time"
  64. {{#unless all_day}} value="{{tTimeToString start_at "tiny"}}" {{/unless}}
  65. placeholder="{{#t "start_time"}}Start Time{{/t}}"
  66. aria-labelledby='calendar_event_start_time_accessible_label'
  67. data-tooltip title="{{accessibleDateFormat 'time'}}"/>
  68. </div>
  69. </td>
  70. <td><span class="time_separator">-</span></td>
  71. <td>
  72. <div class='date_field_container'>
  73. <label class='screenreader-only' id='calendar_event_end_time_accessible_label'>
  74. {{#t}}Event End Time{{/t}}
  75. {{datepickerScreenreaderPrompt 'time'}}
  76. </label>
  77. <input type="text"
  78. name="end_time"
  79. class="time_field end_time"
  80. {{#unless all_day}} value="{{tTimeToString end_at "tiny"}}" {{/unless}}
  81. placeholder="{{#t "end_time"}}End Time{{/t}}"
  82. aria-labelledby='calendar_event_end_time_accessible_label'
  83. data-tooltip title="{{accessibleDateFormat 'time'}}"/>
  84. </div>
  85. </td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. </div>
  90. <div>
  91. <table id="calendar_event_location_info">
  92. <tbody>
  93. <tr>
  94. <td>
  95. <label for="calendar_event_location_name">{{#t "location_name"}}Location:{{/t}}</label>
  96. <input id="calendar_event_location_name" name="location_name" size="30" maxlength="255" type="text" value="{{location_name}}"/>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td>
  101. <label for="calendar_event_location_address">{{#t "location_address"}}Address:{{/t}}</label>
  102. <input id="calendar_event_location_address" name="location_address" size="30" maxlength="255" type="text" value="{{location_address}}"/>
  103. </td>
  104. </tr>
  105. {{#if recurring_calendar_events}}
  106. <tr class="duplicate_event_toggle_row hide">
  107. <td style="vertical-align: top;"><label for="duplicate_event">{{#t "repeat"}}Repeat{{/t}}</label> <input type="checkbox" id="duplicate_event" name="duplicate" value="true" style="margin-left: 10px;" />
  108. </td>
  109. </tr>
  110. <tr class="duplicate_event_row duplicate_fields" style="display: none">
  111. <td class="duplicate_td" colspan="2">
  112. <label for="duplicate_interval">
  113. <div class="duplicate_div">{{#t}}Every{{/t}}</div>
  114. <input value="1" disabled="true" id="duplicate_interval" name="duplicate_interval" min="1" />
  115. <select id="duplicate_frequency" style="width: 100px;" name="duplicate_frequency">
  116. <option value="daily">{{#t}}Day(s){{/t}}</option>
  117. <option value="weekly" selected>{{#t}}Week(s){{/t}}</option>
  118. <option value="monthly">{{#t}}Month(s){{/t}}</option>
  119. </select>
  120. </label>
  121. </td>
  122. </tr>
  123. <tr class="duplicate_event_row duplicate_fields" style="display: none">
  124. <td style="vertical-align: top; padding-left: 20px;" colspan="2">
  125. <label for="duplicate_count">
  126. <div class="duplicate_for_div" >{{#t}}For{{/t}}</div>
  127. <input value="1" disabled="true" type="number" id="duplicate_count" name="duplicate_count" min="1" />
  128. <div class="occurences_div">{{#t}}additional occurrence(s){{/t}}</div>
  129. </label>
  130. </td>
  131. </tr>
  132. <tr class="duplicate_event_row duplicate_fields" style="display: none">
  133. <td class="duplicate_tooltip_td"><label data-tooltip title="{{#t}}Appends a number to the end of each event title (e.g. Event 1, Event 2, etc)" for="append_iterator{{/t}}">{{#t "count"}}Count:{{/t}}</label>
  134. <input data-tooltip title="{{#t}}Appends a number to the end of each event title (e.g. Event 1, Event 2, etc){{/t}}" value="true" disabled="true" type="checkbox" id="append_iterator" name="append_iterator" />
  135. </td>
  136. </tr>
  137. {{/if}}
  138. </tbody>
  139. </table>
  140. </div>
  141. {{#if course_sections}}
  142. <table class="formtable show_if_using_sections">
  143. {{#each course_sections}}
  144. <tr class="date_start_end_row">
  145. <td colspan="4"><label class="row_header" for="section_{{id}}_start_date">{{name}}</label></td>
  146. </tr>
  147. <tr class="date_start_end_row">
  148. <td>
  149. <input type="text"
  150. id="section_{{id}}_start_date"
  151. name="child_event_data[{{id}}][start_date]"
  152. class="date_field start_date"
  153. value="{{tDateToString event.start_at "medium"}}"
  154. aria-label="{{#t "date"}}Date{{/t}}"
  155. placeholder="{{#t "date"}}Date{{/t}}" />
  156. </td>
  157. <td>
  158. <input type="text"
  159. name="child_event_data[{{id}}][start_time]"
  160. class="time_field start_time"
  161. {{#unless all_day}} value="{{tTimeToString event.start_at "tiny"}}" {{/unless}}
  162. aria-label="{{#t "start_time"}}Start Time{{/t}}"
  163. placeholder="{{#t "start_time"}}Start Time{{/t}}" />
  164. </td>
  165. <td><span class="time_separator">-</span></td>
  166. <td>
  167. <input type="text"
  168. name="child_event_data[{{id}}][end_time]"
  169. class="time_field end_time"
  170. {{#unless all_day}} value="{{tTimeToString event.end_at "tiny"}}" {{/unless}}
  171. aria-label="{{#t "end_time"}}End Time{{/t}}"
  172. placeholder="{{#t "end_time"}}End Time{{/t}}" />
  173. <input type="hidden"
  174. name="child_event_data[{{id}}][context_code]"
  175. value="course_section_{{id}}" />
  176. </td>
  177. </tr>
  178. {{/each}}
  179. </table>
  180. {{/if}}
  181. <div class="form-actions">
  182. {{#if url}}
  183. <button type="button" class="btn delete_link">{{#t "delete"}}Delete{{/t}}</button>
  184. {{/if}}
  185. {{#if return_to_url}}
  186. <a href="{{return_to_url}}" class="btn" role="button">{{#t "#buttons.cancel"}}Cancel{{/t}}</a>
  187. {{/if}}
  188. <button type="submit" class="btn btn-primary">
  189. {{#if newRecord}}
  190. {{#t "buttons.create"}}Create Event{{/t}}
  191. {{else}}
  192. {{#t "buttons.update"}}Update Event{{/t}}
  193. {{/if}}
  194. </button>
  195. </div>
  196. </form>