fe 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (402) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +4 -4
  3. data/app/assets/config/fe/manifest.js +3 -0
  4. data/app/assets/config/manifest.js +3 -0
  5. data/app/assets/javascripts/application.js.erb +1 -1
  6. data/app/assets/javascripts/fe/admin.js +0 -1
  7. data/app/assets/javascripts/fe/fe.admin.js +2 -6
  8. data/app/assets/javascripts/fe/{fe.common.js → fe.common.js.erb} +14 -7
  9. data/app/assets/javascripts/fe/fe.public.js +1 -2
  10. data/app/assets/javascripts/fe/{fe.public.nojquery.js → fe.public.nojquery.js.erb} +152 -76
  11. data/app/assets/javascripts/fe/jquery.html5_upload.js +258 -0
  12. data/app/assets/stylesheets/fe/fe.screen.css.scss.erb +22 -1
  13. data/app/assets/stylesheets/fe/validation.css +5 -1
  14. data/app/controllers/{fe/concerns → concerns/fe}/admin/question_sheets_controller_concern.rb +15 -16
  15. data/app/controllers/concerns/fe/answer_pages_controller_concern.rb +131 -0
  16. data/app/controllers/{fe/concerns → concerns/fe}/answer_sheets_controller_concern.rb +14 -6
  17. data/app/controllers/{fe/concerns → concerns/fe}/application_controller_concern.rb +3 -3
  18. data/app/controllers/fe/admin/elements_controller.rb +46 -24
  19. data/app/controllers/fe/admin/email_templates_controller.rb +5 -5
  20. data/app/controllers/fe/admin/question_pages_controller.rb +8 -8
  21. data/app/controllers/fe/reference_pages_controller.rb +11 -11
  22. data/app/controllers/fe/reference_sheets_controller.rb +4 -4
  23. data/app/controllers/fe/references_controller.rb +19 -19
  24. data/app/controllers/fe/submit_pages_controller.rb +5 -5
  25. data/app/helpers/fe/answer_pages_helper.rb +1 -1
  26. data/app/helpers/fe/application_helper.rb +3 -3
  27. data/app/jobs/fe/update_reference_sheet_visibility_job.rb +11 -0
  28. data/app/mailers/fe/notifier.rb +4 -4
  29. data/app/models/answer_sheet.rb +1 -1
  30. data/app/models/application_record.rb +3 -0
  31. data/app/models/{fe/concerns → concerns/fe}/answer_concern.rb +2 -2
  32. data/app/models/{fe/concerns → concerns/fe}/answer_pages_presenter_concern.rb +6 -5
  33. data/app/models/concerns/fe/answer_sheet_concern.rb +125 -0
  34. data/app/models/{fe/concerns → concerns/fe}/choice_field_concern.rb +41 -23
  35. data/app/models/fe/address.rb +2 -2
  36. data/app/models/fe/answer.rb +1 -1
  37. data/app/models/fe/answer_sheet.rb +1 -1
  38. data/app/models/fe/answer_sheet_question_sheet.rb +2 -2
  39. data/app/models/fe/application.rb +14 -10
  40. data/app/models/fe/condition.rb +4 -4
  41. data/app/models/fe/date_field.rb +1 -1
  42. data/app/models/fe/element.rb +126 -44
  43. data/app/models/fe/email_address.rb +2 -2
  44. data/app/models/fe/email_template.rb +1 -1
  45. data/app/models/fe/page.rb +94 -19
  46. data/app/models/fe/page_element.rb +2 -2
  47. data/app/models/fe/paragraph.rb +1 -1
  48. data/app/models/fe/person.rb +5 -5
  49. data/app/models/fe/phone_number.rb +1 -1
  50. data/app/models/fe/question.rb +62 -38
  51. data/app/models/fe/question_grid.rb +15 -3
  52. data/app/models/fe/question_set.rb +53 -13
  53. data/app/models/fe/question_sheet.rb +49 -16
  54. data/app/models/fe/reference_question.rb +9 -3
  55. data/app/models/fe/reference_sheet.rb +102 -47
  56. data/app/models/fe/state_chooser.rb +2 -2
  57. data/app/models/fe/text_field.rb +2 -2
  58. data/app/models/fe/user.rb +1 -1
  59. data/app/models/staff.rb +6 -6
  60. data/app/views/fe/admin/elements/create.js.erb +3 -3
  61. data/app/views/fe/admin/elements/destroy.js.erb +1 -1
  62. data/app/views/fe/admin/elements/drop.js.erb +1 -1
  63. data/app/views/fe/admin/elements/duplicate.js.erb +1 -1
  64. data/app/views/fe/admin/elements/edit.js.erb +1 -1
  65. data/app/views/fe/admin/elements/error.js.erb +1 -1
  66. data/app/views/fe/admin/elements/new.js.erb +13 -6
  67. data/app/views/fe/admin/elements/update.js.erb +1 -1
  68. data/app/views/fe/admin/email_templates/_form.html.erb +3 -3
  69. data/app/views/fe/admin/email_templates/edit.html.erb +3 -3
  70. data/app/views/fe/admin/email_templates/index.html.erb +3 -3
  71. data/app/views/fe/admin/email_templates/new.html.erb +3 -3
  72. data/app/views/fe/admin/panels/_advanced_options.html.erb +8 -8
  73. data/app/views/fe/admin/panels/_common_boolean_fields.html.erb +1 -0
  74. data/app/views/fe/admin/panels/_common_boolean_fields_default.html.erb +11 -0
  75. data/app/views/fe/admin/panels/_common_fields.html.erb +2 -17
  76. data/app/views/fe/admin/panels/_condition.html.erb +1 -1
  77. data/app/views/fe/admin/panels/_insert.html.erb +25 -25
  78. data/app/views/fe/admin/panels/_nav_controls.html.erb +4 -4
  79. data/app/views/fe/admin/panels/_page.html.erb +1 -1
  80. data/app/views/fe/admin/panels/_pages_list.html.erb +3 -3
  81. data/app/views/fe/admin/panels/_prop_attachment_field.html.erb +2 -2
  82. data/app/views/fe/admin/panels/_prop_choice_field.html.erb +36 -17
  83. data/app/views/fe/admin/panels/_prop_date_field.html.erb +1 -1
  84. data/app/views/fe/admin/panels/_prop_element.html.erb +5 -5
  85. data/app/views/fe/admin/panels/_prop_page.html.erb +3 -3
  86. data/app/views/fe/admin/panels/_prop_paragraph.html.erb +8 -8
  87. data/app/views/fe/admin/panels/_prop_question_grid.html.erb +7 -2
  88. data/app/views/fe/admin/panels/_prop_question_grid_with_total.html.erb +2 -2
  89. data/app/views/fe/admin/panels/_prop_reference_question.html.erb +3 -3
  90. data/app/views/fe/admin/panels/_prop_section.html.erb +1 -1
  91. data/app/views/fe/admin/panels/_prop_sheet.html.erb +3 -3
  92. data/app/views/fe/admin/panels/_prop_text_field.html.erb +12 -12
  93. data/app/views/fe/admin/question_pages/_element.html.erb +7 -7
  94. data/app/views/fe/admin/question_pages/_element_show.html.erb +2 -2
  95. data/app/views/fe/admin/question_pages/_question_page.html.erb +4 -4
  96. data/app/views/fe/admin/question_pages/create.js.erb +3 -3
  97. data/app/views/fe/admin/question_pages/destroy.js.erb +3 -3
  98. data/app/views/fe/admin/question_pages/edit.js.erb +1 -1
  99. data/app/views/fe/admin/question_pages/error.js.erb +1 -1
  100. data/app/views/fe/admin/question_pages/show.js.erb +2 -2
  101. data/app/views/fe/admin/question_pages/show_panel.js.erb +1 -1
  102. data/app/views/fe/admin/question_pages/update.js.erb +1 -1
  103. data/app/views/fe/admin/question_sheets/edit.js.erb +1 -1
  104. data/app/views/fe/admin/question_sheets/error.js.erb +1 -1
  105. data/app/views/fe/admin/question_sheets/index.html.erb +8 -8
  106. data/app/views/fe/admin/question_sheets/new.html.erb +3 -3
  107. data/app/views/fe/admin/question_sheets/show.html.erb +5 -5
  108. data/app/views/fe/admin/question_sheets/update.js.erb +1 -1
  109. data/app/views/fe/answer_pages/_answer_page.html.erb +13 -14
  110. data/app/views/fe/answer_pages/_element.html.erb +22 -2
  111. data/app/views/fe/answer_pages/_page_name.html.erb +1 -1
  112. data/app/views/fe/answer_pages/show.html.erb +39 -0
  113. data/app/views/fe/answer_pages/update.js.erb +10 -2
  114. data/app/views/fe/answer_sheets/_answer_sheet.html.erb +4 -4
  115. data/app/views/fe/answer_sheets/_element.html.erb +9 -7
  116. data/app/views/fe/answer_sheets/_incomplete.html.erb +1 -1
  117. data/app/views/fe/answer_sheets/_page_link.html.erb +9 -7
  118. data/app/views/fe/answer_sheets/_pages_list.html.erb +3 -3
  119. data/app/views/fe/answer_sheets/_submit_to.html.erb +1 -1
  120. data/app/views/fe/answer_sheets/_title.html.erb +1 -1
  121. data/app/views/fe/answer_sheets/edit.html.erb +18 -18
  122. data/app/views/fe/answer_sheets/incomplete.js.erb +7 -4
  123. data/app/views/fe/answer_sheets/index.html.erb +1 -1
  124. data/app/views/fe/answer_sheets/show.html.erb +1 -1
  125. data/app/views/fe/applications/_logout.html.erb +1 -1
  126. data/app/views/fe/questions/fe/_acceptance.html.erb +10 -9
  127. data/app/views/fe/questions/fe/_attachment_field.html.erb +129 -10
  128. data/app/views/fe/questions/fe/_checkbox_field.html.erb +18 -16
  129. data/app/views/fe/questions/fe/_country.html.erb +6 -6
  130. data/app/views/fe/questions/fe/_date_field.html.erb +5 -4
  131. data/app/views/fe/questions/fe/_date_field_mmyy.html.erb +8 -8
  132. data/app/views/fe/questions/fe/_drop_down_field.html.erb +5 -5
  133. data/app/views/fe/questions/fe/_question_grid.html.erb +10 -10
  134. data/app/views/fe/questions/fe/_question_grid_with_total.html.erb +8 -8
  135. data/app/views/fe/questions/fe/_questions.html.erb +11 -5
  136. data/app/views/fe/questions/fe/_radio_button_field.html.erb +35 -19
  137. data/app/views/fe/questions/fe/_rating.html.erb +56 -18
  138. data/app/views/fe/questions/fe/_reference_discipler.html.erb +1 -1
  139. data/app/views/fe/questions/fe/_reference_friend.html.erb +1 -1
  140. data/app/views/fe/questions/fe/_reference_parent.html.erb +1 -1
  141. data/app/views/fe/questions/fe/_reference_peer.html.erb +1 -1
  142. data/app/views/fe/questions/fe/_reference_question.html.erb +40 -24
  143. data/app/views/fe/questions/fe/_reference_roommate.html.erb +1 -1
  144. data/app/views/fe/questions/fe/_reference_spiritual.html.erb +1 -1
  145. data/app/views/fe/questions/fe/_reference_staff.html.erb +1 -1
  146. data/app/views/fe/questions/fe/_state_chooser.html.erb +6 -6
  147. data/app/views/fe/questions/fe/_text_area_field.html.erb +14 -10
  148. data/app/views/fe/questions/fe/_text_field.html.erb +7 -6
  149. data/app/views/fe/questions/fe/_yes_no.html.erb +8 -8
  150. data/app/views/fe/questions/fe/_yes_no_field.erb +11 -8
  151. data/app/views/fe/reference_pages/_reference.html.erb +12 -12
  152. data/app/views/fe/reference_pages/edit.html.erb +4 -4
  153. data/app/views/fe/reference_sheets/done.html.erb +2 -2
  154. data/app/views/fe/reference_sheets/not_found.html.erb +3 -3
  155. data/app/views/fe/references/edit.html.erb +5 -5
  156. data/app/views/fe/references/show.html.erb +3 -3
  157. data/app/views/fe/references/submit.js.erb +3 -3
  158. data/app/views/fe/submit_pages/_thankyou.html.erb +1 -1
  159. data/app/views/fe/submit_pages/edit.html.erb +9 -9
  160. data/app/views/fe/submit_pages/error.js.erb +1 -1
  161. data/app/views/fe/submit_pages/submit.js.erb +2 -2
  162. data/app/views/layouts/fe/_error_messages_for.html.erb +1 -1
  163. data/app/views/layouts/fe/application.html.erb +3 -4
  164. data/app/views/layouts/fe/fe_admin.html.erb +30 -0
  165. data/app/views.current/fe/admin/elements/_errors.html.erb +11 -0
  166. data/app/views.current/fe/admin/elements/create.js.erb +12 -0
  167. data/app/views.current/fe/admin/elements/destroy.js.erb +4 -0
  168. data/app/views.current/fe/admin/elements/drop.js.erb +3 -0
  169. data/app/views.current/fe/admin/elements/duplicate.js.erb +3 -0
  170. data/app/views.current/fe/admin/elements/edit.js.erb +4 -0
  171. data/app/views.current/fe/admin/elements/error.js.erb +4 -0
  172. data/app/views.current/fe/admin/elements/new.js.erb +17 -0
  173. data/app/views.current/fe/admin/elements/update.js.erb +9 -0
  174. data/app/views.current/fe/admin/email_templates/_form.html.erb +8 -0
  175. data/app/views.current/fe/admin/email_templates/edit.html.erb +13 -0
  176. data/app/views.current/fe/admin/email_templates/index.html.erb +20 -0
  177. data/app/views.current/fe/admin/email_templates/new.html.erb +11 -0
  178. data/app/views.current/fe/admin/panels/_advanced_options.html.erb +49 -0
  179. data/app/views.current/fe/admin/panels/_common_boolean_fields.html.erb +1 -0
  180. data/app/views.current/fe/admin/panels/_common_boolean_fields_default.html.erb +11 -0
  181. data/app/views.current/fe/admin/panels/_common_fields.html.erb +23 -0
  182. data/app/views.current/fe/admin/panels/_condition.html.erb +6 -0
  183. data/app/views.current/fe/admin/panels/_insert.html.erb +39 -0
  184. data/app/views.current/fe/admin/panels/_nav_controls.html.erb +6 -0
  185. data/app/views.current/fe/admin/panels/_page.html.erb +3 -0
  186. data/app/views.current/fe/admin/panels/_pages_list.html.erb +16 -0
  187. data/app/views.current/fe/admin/panels/_prop_attachment_field.html.erb +2 -0
  188. data/app/views.current/fe/admin/panels/_prop_choice_field.html.erb +74 -0
  189. data/app/views.current/fe/admin/panels/_prop_date_field.html.erb +7 -0
  190. data/app/views.current/fe/admin/panels/_prop_element.html.erb +23 -0
  191. data/app/views.current/fe/admin/panels/_prop_page.html.erb +26 -0
  192. data/app/views.current/fe/admin/panels/_prop_paragraph.html.erb +46 -0
  193. data/app/views.current/fe/admin/panels/_prop_question_grid.html.erb +28 -0
  194. data/app/views.current/fe/admin/panels/_prop_question_grid_with_total.html.erb +14 -0
  195. data/app/views.current/fe/admin/panels/_prop_reference_question.html.erb +12 -0
  196. data/app/views.current/fe/admin/panels/_prop_section.html.erb +8 -0
  197. data/app/views.current/fe/admin/panels/_prop_sheet.html.erb +20 -0
  198. data/app/views.current/fe/admin/panels/_prop_text_field.html.erb +20 -0
  199. data/app/views.current/fe/admin/question_pages/_element.html.erb +28 -0
  200. data/app/views.current/fe/admin/question_pages/_element_show.html.erb +10 -0
  201. data/app/views.current/fe/admin/question_pages/_errors.html.erb +10 -0
  202. data/app/views.current/fe/admin/question_pages/_question_page.html.erb +13 -0
  203. data/app/views.current/fe/admin/question_pages/create.js.erb +11 -0
  204. data/app/views.current/fe/admin/question_pages/destroy.js.erb +5 -0
  205. data/app/views.current/fe/admin/question_pages/edit.js.erb +3 -0
  206. data/app/views.current/fe/admin/question_pages/error.js.erb +4 -0
  207. data/app/views.current/fe/admin/question_pages/show.js.erb +9 -0
  208. data/app/views.current/fe/admin/question_pages/show_panel.js.erb +3 -0
  209. data/app/views.current/fe/admin/question_pages/update.js.erb +2 -0
  210. data/app/views.current/fe/admin/question_sheets/_errors.html.erb +11 -0
  211. data/app/views.current/fe/admin/question_sheets/edit.js.erb +3 -0
  212. data/app/views.current/fe/admin/question_sheets/error.js.erb +5 -0
  213. data/app/views.current/fe/admin/question_sheets/index.html.erb +41 -0
  214. data/app/views.current/fe/admin/question_sheets/new.html.erb +15 -0
  215. data/app/views.current/fe/admin/question_sheets/show.html.erb +27 -0
  216. data/app/views.current/fe/admin/question_sheets/update.js.erb +2 -0
  217. data/app/views.current/fe/answer_pages/_answer_page.html.erb +53 -0
  218. data/app/views.current/fe/answer_pages/_element.html.erb +32 -0
  219. data/app/views.current/fe/answer_pages/_page_name.html.erb +1 -0
  220. data/app/views.current/fe/answer_pages/show.html.erb +39 -0
  221. data/app/views.current/fe/answer_pages/update.js.erb +13 -0
  222. data/app/views.current/fe/answer_sheets/_answer_sheet.html.erb +26 -0
  223. data/app/views.current/fe/answer_sheets/_element.html.erb +74 -0
  224. data/app/views.current/fe/answer_sheets/_incomplete.html.erb +10 -0
  225. data/app/views.current/fe/answer_sheets/_page_link.html.erb +9 -0
  226. data/app/views.current/fe/answer_sheets/_pages_list.html.erb +11 -0
  227. data/app/views.current/fe/answer_sheets/_submit_to.html.erb +1 -0
  228. data/app/views.current/fe/answer_sheets/_title.html.erb +1 -0
  229. data/app/views.current/fe/answer_sheets/edit.html.erb +66 -0
  230. data/app/views.current/fe/answer_sheets/incomplete.js.erb +11 -0
  231. data/app/views.current/fe/answer_sheets/index.html.erb +18 -0
  232. data/app/views.current/fe/answer_sheets/send_reference_invite.js.erb +8 -0
  233. data/app/views.current/fe/answer_sheets/show.html.erb +13 -0
  234. data/app/views.current/fe/applications/_logout.html.erb +1 -0
  235. data/app/views.current/fe/applications/show.html.erb +1 -0
  236. data/app/views.current/fe/help/builder.html +33 -0
  237. data/app/views.current/fe/help/question_grid.html +18 -0
  238. data/app/views.current/fe/questions/fe/_acceptance.html.erb +14 -0
  239. data/app/views.current/fe/questions/fe/_attachment_field.html.erb +165 -0
  240. data/app/views.current/fe/questions/fe/_checkbox_field.html.erb +53 -0
  241. data/app/views.current/fe/questions/fe/_country.html.erb +7 -0
  242. data/app/views.current/fe/questions/fe/_date_field.html.erb +7 -0
  243. data/app/views.current/fe/questions/fe/_date_field_mmyy.html.erb +9 -0
  244. data/app/views.current/fe/questions/fe/_drop_down_field.html.erb +8 -0
  245. data/app/views.current/fe/questions/fe/_paragraph.html.erb +1 -0
  246. data/app/views.current/fe/questions/fe/_question_grid.html.erb +70 -0
  247. data/app/views.current/fe/questions/fe/_question_grid_with_total.html.erb +64 -0
  248. data/app/views.current/fe/questions/fe/_questions.html.erb +15 -0
  249. data/app/views.current/fe/questions/fe/_radio_button_field.html.erb +60 -0
  250. data/app/views.current/fe/questions/fe/_rating.html.erb +64 -0
  251. data/app/views.current/fe/questions/fe/_reference_discipler.html.erb +1 -0
  252. data/app/views.current/fe/questions/fe/_reference_friend.html.erb +1 -0
  253. data/app/views.current/fe/questions/fe/_reference_parent.html.erb +1 -0
  254. data/app/views.current/fe/questions/fe/_reference_peer.html.erb +1 -0
  255. data/app/views.current/fe/questions/fe/_reference_question.html.erb +61 -0
  256. data/app/views.current/fe/questions/fe/_reference_roommate.html.erb +1 -0
  257. data/app/views.current/fe/questions/fe/_reference_spiritual.html.erb +1 -0
  258. data/app/views.current/fe/questions/fe/_reference_staff.html.erb +1 -0
  259. data/app/views.current/fe/questions/fe/_section.html.erb +1 -0
  260. data/app/views.current/fe/questions/fe/_state_chooser.html.erb +7 -0
  261. data/app/views.current/fe/questions/fe/_text_area_field.html.erb +17 -0
  262. data/app/views.current/fe/questions/fe/_text_field.html.erb +9 -0
  263. data/app/views.current/fe/questions/fe/_yes_no.html.erb +17 -0
  264. data/app/views.current/fe/questions/fe/_yes_no_field.erb +20 -0
  265. data/app/views.current/fe/reference_pages/_reference.html.erb +31 -0
  266. data/app/views.current/fe/reference_pages/edit.html.erb +24 -0
  267. data/app/views.current/fe/reference_sheets/done.html.erb +2 -0
  268. data/app/views.current/fe/reference_sheets/not_found.html.erb +5 -0
  269. data/app/views.current/fe/reference_sheets/submitted.js.erb +1 -0
  270. data/app/views.current/fe/references/edit.html.erb +8 -0
  271. data/app/views.current/fe/references/send_invite.js.erb +7 -0
  272. data/app/views.current/fe/references/show.html.erb +18 -0
  273. data/app/views.current/fe/references/submit.js.erb +3 -0
  274. data/app/views.current/fe/submit_pages/_errors.html.erb +1 -0
  275. data/app/views.current/fe/submit_pages/_thankyou.html.erb +2 -0
  276. data/app/views.current/fe/submit_pages/edit.html.erb +36 -0
  277. data/app/views.current/fe/submit_pages/error.js.erb +1 -0
  278. data/app/views.current/fe/submit_pages/submit.js.erb +3 -0
  279. data/app/views.current/layouts/fe/_error_messages_for.html.erb +7 -0
  280. data/app/views.current/layouts/fe/application.html.erb +47 -0
  281. data/app/{views/layouts/fe/fe.admin.html.erb → views.current/layouts/fe/fe_admin.html.erb} +4 -4
  282. data/config/initializers/paper_trail.rb +3 -0
  283. data/config/routes.rb +3 -1
  284. data/db/migrate/20131003041856_core.rb +23 -23
  285. data/db/migrate/20131003044250_create_reference_sheets.rb +1 -1
  286. data/db/migrate/20131003044436_add_element_and_answer_fields.rb +3 -3
  287. data/db/migrate/20131003044518_create_email_templates.rb +2 -2
  288. data/db/migrate/20131003044621_add_max_lengths.rb +1 -1
  289. data/db/migrate/20131003044714_create_join_table.rb +1 -1
  290. data/db/migrate/20131016162128_remove_question_id_from_element.rb +1 -1
  291. data/db/migrate/20140623153424_create_fe_people.rb +1 -1
  292. data/db/migrate/20140624180246_create_fe_addresses.rb +1 -1
  293. data/db/migrate/20140624182216_create_fe_phone_numbers.rb +1 -1
  294. data/db/migrate/20140625160545_create_fe_users.rb +1 -1
  295. data/db/migrate/20140808202507_add_conditional_type_to_elements.rb +1 -1
  296. data/db/migrate/20140808203609_add_conditional_answer_to_elements.rb +1 -1
  297. data/db/migrate/20141103204704_remove_short_value_column.rb +1 -1
  298. data/db/migrate/20141109154522_move_conditional_ids_used_for_choice_field_to_their_own_column.rb +1 -1
  299. data/db/migrate/20150504221439_add_all_element_ids_to_pages.rb +1 -1
  300. data/db/migrate/20150713022326_add_locale_columns.rb +1 -1
  301. data/db/migrate/20150714220730_add_locale_to_answer_sheet.rb +1 -1
  302. data/db/migrate/20150925181652_add_share_to_elements.rb +5 -0
  303. data/db/migrate/20150928085325_change_pages_all_element_ids_to_text.rb +1 -1
  304. data/db/migrate/20150930191538_add_locale_to_reference_sheets.rb +1 -1
  305. data/db/migrate/20151021181928_switch_conditional_answer_separator_to_semicolon.rb +7 -0
  306. data/db/migrate/20151021184250_add_question_sheet_id_in_refs.rb +12 -0
  307. data/db/migrate/20160201185838_add_visible_and_visibility_cache_key_to_reference_sheets.rb +6 -0
  308. data/db/migrate/20160805221415_add_rating_extra_labels.rb +10 -0
  309. data/db/migrate/20181108201746_create_versions.rb +80 -0
  310. data/db/migrate/20181218201130_increase_slug_length.rb +5 -0
  311. data/lib/fe/engine.rb +10 -10
  312. data/lib/fe/version.rb +1 -1
  313. data/lib/fe.rb +7 -1
  314. data/spec/controllers/fe/admin/elements_controller_spec.rb +30 -20
  315. data/spec/controllers/fe/admin/email_templates_controller_spec.rb +2 -2
  316. data/spec/controllers/fe/admin/question_pages_controller_spec.rb +1 -1
  317. data/spec/controllers/fe/admin/question_sheets_controller_spec.rb +4 -4
  318. data/spec/controllers/fe/answer_pages_controller_spec.rb +86 -30
  319. data/spec/controllers/fe/answer_sheets_controller_spec.rb +65 -9
  320. data/spec/dummy/app/assets/config/manifest.js +0 -0
  321. data/spec/dummy/app/models/user.rb +1 -1
  322. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  323. data/spec/dummy/config/application.rb +1 -0
  324. data/spec/dummy/config/environments/test.rb +3 -3
  325. data/spec/dummy/config/initializers/assets.rb +5 -2
  326. data/spec/dummy/config/initializers/fast_gettext.rb +1 -1
  327. data/spec/dummy/config/initializers/to_unsafe_h.rb +5 -0
  328. data/spec/dummy/config/initializers/to_unsafe_h.rb.new +5 -0
  329. data/spec/dummy/db/migrate/20141203214017_core.fe_engine.rb +23 -23
  330. data/spec/dummy/db/migrate/20141203214018_create_reference_sheets.fe_engine.rb +1 -1
  331. data/spec/dummy/db/migrate/20141203214019_add_element_and_answer_fields.fe_engine.rb +3 -3
  332. data/spec/dummy/db/migrate/20141203214020_create_email_templates.fe_engine.rb +2 -2
  333. data/spec/dummy/db/migrate/20141203214021_add_max_lengths.fe_engine.rb +1 -1
  334. data/spec/dummy/db/migrate/20141203214022_create_join_table.fe_engine.rb +1 -1
  335. data/spec/dummy/db/migrate/20141203214023_remove_question_id_from_element.fe_engine.rb +1 -1
  336. data/spec/dummy/db/migrate/20141203214024_create_fe_people.fe_engine.rb +1 -1
  337. data/spec/dummy/db/migrate/20141203214025_create_fe_addresses.fe_engine.rb +1 -1
  338. data/spec/dummy/db/migrate/20141203214027_create_fe_users.fe_engine.rb +1 -1
  339. data/spec/dummy/db/migrate/20141203214028_add_conditional_type_to_elements.fe_engine.rb +1 -1
  340. data/spec/dummy/db/migrate/20141203214029_add_conditional_answer_to_elements.fe_engine.rb +1 -1
  341. data/spec/dummy/db/migrate/20141203214030_remove_short_value_column.fe_engine.rb +1 -1
  342. data/spec/dummy/db/migrate/20141203214031_move_conditional_ids_used_for_choice_field_to_their_own_column.fe_engine.rb +1 -1
  343. data/spec/dummy/db/migrate/20150123215803_create_users.rb +1 -1
  344. data/spec/dummy/db/migrate/20150504222619_add_all_element_ids_to_pages.fe_engine.rb +1 -1
  345. data/spec/dummy/db/migrate/20150925192557_add_share_to_elements.fe_engine.rb +6 -0
  346. data/spec/dummy/db/migrate/20150930190001_create_fe_phone_numbers.fe_engine.rb +1 -1
  347. data/spec/dummy/db/migrate/20150930190002_add_locale_columns.fe_engine.rb +1 -1
  348. data/spec/dummy/db/migrate/20150930190003_add_locale_to_answer_sheet.fe_engine.rb +1 -1
  349. data/spec/dummy/db/migrate/20150930190004_change_pages_all_element_ids_to_text.fe_engine.rb +1 -1
  350. data/spec/dummy/db/migrate/20150930191756_add_locale_to_reference_sheets.fe_engine.rb +1 -1
  351. data/spec/dummy/db/migrate/20151021190027_add_question_sheet_id_in_refs.fe_engine.rb +13 -0
  352. data/spec/dummy/db/migrate/20160204164612_switch_conditional_answer_separator_to_semicolon.fe_engine.rb +8 -0
  353. data/spec/dummy/db/migrate/20160204164613_add_visible_and_visibility_cache_key_to_reference_sheets.fe_engine.rb +7 -0
  354. data/spec/dummy/db/migrate/20181108201746_create_versions.rb +80 -0
  355. data/spec/dummy/db/schema.rb +71 -79
  356. data/spec/dummy/log/test.log +101278 -419
  357. data/spec/factories/answer_sheet_question_sheets.rb +1 -1
  358. data/spec/factories/answer_sheets.rb +2 -2
  359. data/spec/factories/answers.rb +1 -1
  360. data/spec/factories/applications.rb +3 -3
  361. data/spec/factories/dummy_applications.rb +3 -3
  362. data/spec/factories/dummy_people.rb +3 -3
  363. data/spec/factories/dummy_users.rb +3 -3
  364. data/spec/factories/elements.rb +21 -21
  365. data/spec/factories/email_templates.rb +3 -3
  366. data/spec/factories/fe_addresses.rb +10 -10
  367. data/spec/factories/fe_email_addresses.rb +3 -3
  368. data/spec/factories/fe_email_templates.rb +4 -4
  369. data/spec/factories/fe_people.rb +5 -5
  370. data/spec/factories/fe_phone_numbers.rb +3 -3
  371. data/spec/factories/fe_user.rb +3 -3
  372. data/spec/factories/page.rb +1 -1
  373. data/spec/factories/page_elements.rb +1 -1
  374. data/spec/factories/paragraphs.rb +1 -1
  375. data/spec/factories/question_sheet.rb +2 -2
  376. data/spec/factories/reference_questions.rb +1 -1
  377. data/spec/factories/reference_sheets.rb +1 -1
  378. data/spec/jobs/fe/update_reference_sheet_visibility_job_spec.rb +40 -0
  379. data/spec/models/fe/answer_sheet_question_sheet_spec.rb +1 -1
  380. data/spec/models/fe/answer_spec.rb +2 -2
  381. data/spec/models/fe/application_spec.rb +94 -1
  382. data/spec/models/fe/choice_field_spec.rb +47 -1
  383. data/spec/models/fe/condition_spec.rb +2 -2
  384. data/spec/models/fe/element_spec.rb +252 -60
  385. data/spec/models/fe/email_template_spec.rb +1 -1
  386. data/spec/models/fe/page_element_spec.rb +1 -1
  387. data/spec/models/fe/page_spec.rb +57 -12
  388. data/spec/models/fe/person_spec.rb +1 -1
  389. data/spec/models/fe/question_set_spec.rb +91 -0
  390. data/spec/models/fe/question_sheet_spec.rb +11 -15
  391. data/spec/models/fe/question_spec.rb +73 -6
  392. data/spec/models/fe/reference_question_spec.rb +20 -0
  393. data/spec/models/fe/reference_sheet_spec.rb +287 -4
  394. data/spec/models/fe/text_field_spec.rb +22 -0
  395. data/spec/rails_helper.rb +79 -76
  396. metadata +195 -57
  397. data/app/assets/javascripts/fe/jquery.scrollTo-min.js +0 -7
  398. data/app/controllers/fe/concerns/answer_pages_controller_concern.rb +0 -84
  399. data/app/models/fe/concerns/answer_sheet_concern.rb +0 -85
  400. data/spec/dummy/db/migrate/20141203214026_create_create_fe_phone_numbers.fe_engine.rb +0 -17
  401. data/spec/dummy/log/development.log +0 -5
  402. /data/app/{assets/stylesheets/360front.css → views.current/fe/admin/elements/reorder.js.erb} +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CruGlobal
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2023-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,58 +16,50 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.0
19
+ version: 5.0.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.1.0
26
+ version: 5.0.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: acts_as_list
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.7.2
33
+ version: 0.9.17
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.7.2
40
+ version: 0.9.17
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: aasm
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 3.4.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 3.4.0
55
- - !ruby/object:Gem::Dependency
56
- name: jquery-rails
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - ">="
60
46
  - !ruby/object:Gem::Version
61
- version: '0'
47
+ version: '4'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '6'
62
51
  type: :runtime
63
52
  prerelease: false
64
53
  version_requirements: !ruby/object:Gem::Requirement
65
54
  requirements:
66
55
  - - ">="
67
56
  - !ruby/object:Gem::Version
68
- version: '0'
57
+ version: '4'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '6'
69
61
  - !ruby/object:Gem::Dependency
70
- name: jquery-ui-rails
62
+ name: jquery-rails
71
63
  requirement: !ruby/object:Gem::Requirement
72
64
  requirements:
73
65
  - - ">="
@@ -81,7 +73,7 @@ dependencies:
81
73
  - !ruby/object:Gem::Version
82
74
  version: '0'
83
75
  - !ruby/object:Gem::Dependency
84
- name: dynamic_form
76
+ name: jquery-ui-rails
85
77
  requirement: !ruby/object:Gem::Requirement
86
78
  requirements:
87
79
  - - ">="
@@ -165,27 +157,27 @@ dependencies:
165
157
  - !ruby/object:Gem::Version
166
158
  version: 1.2.3
167
159
  - !ruby/object:Gem::Dependency
168
- name: mysql2
160
+ name: paper_trail
169
161
  requirement: !ruby/object:Gem::Requirement
170
162
  requirements:
171
163
  - - ">="
172
164
  - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
165
+ version: '10'
166
+ type: :runtime
175
167
  prerelease: false
176
168
  version_requirements: !ruby/object:Gem::Requirement
177
169
  requirements:
178
170
  - - ">="
179
171
  - !ruby/object:Gem::Version
180
- version: '0'
172
+ version: '10'
181
173
  - !ruby/object:Gem::Dependency
182
- name: rspec-rails
174
+ name: libxml-ruby
183
175
  requirement: !ruby/object:Gem::Requirement
184
176
  requirements:
185
177
  - - ">="
186
178
  - !ruby/object:Gem::Version
187
179
  version: '0'
188
- type: :development
180
+ type: :runtime
189
181
  prerelease: false
190
182
  version_requirements: !ruby/object:Gem::Requirement
191
183
  requirements:
@@ -193,7 +185,7 @@ dependencies:
193
185
  - !ruby/object:Gem::Version
194
186
  version: '0'
195
187
  - !ruby/object:Gem::Dependency
196
- name: shoulda
188
+ name: rspec-rails
197
189
  requirement: !ruby/object:Gem::Requirement
198
190
  requirements:
199
191
  - - ">="
@@ -207,7 +199,7 @@ dependencies:
207
199
  - !ruby/object:Gem::Version
208
200
  version: '0'
209
201
  - !ruby/object:Gem::Dependency
210
- name: factory_girl_rails
202
+ name: shoulda
211
203
  requirement: !ruby/object:Gem::Requirement
212
204
  requirements:
213
205
  - - ">="
@@ -221,7 +213,7 @@ dependencies:
221
213
  - !ruby/object:Gem::Version
222
214
  version: '0'
223
215
  - !ruby/object:Gem::Dependency
224
- name: rails-dummy
216
+ name: factory_bot_rails
225
217
  requirement: !ruby/object:Gem::Requirement
226
218
  requirements:
227
219
  - - ">="
@@ -244,6 +236,8 @@ files:
244
236
  - MIT-LICENSE
245
237
  - README.md
246
238
  - Rakefile
239
+ - app/assets/config/fe/manifest.js
240
+ - app/assets/config/manifest.js
247
241
  - app/assets/images/fe/ajax-loader.gif
248
242
  - app/assets/images/fe/butgrad.png
249
243
  - app/assets/images/fe/icons/add.png
@@ -296,36 +290,41 @@ files:
296
290
  - app/assets/javascripts/application.js.erb
297
291
  - app/assets/javascripts/fe/admin.js
298
292
  - app/assets/javascripts/fe/fe.admin.js
299
- - app/assets/javascripts/fe/fe.common.js
293
+ - app/assets/javascripts/fe/fe.common.js.erb
300
294
  - app/assets/javascripts/fe/fe.public.js
301
- - app/assets/javascripts/fe/fe.public.nojquery.js
295
+ - app/assets/javascripts/fe/fe.public.nojquery.js.erb
296
+ - app/assets/javascripts/fe/jquery.html5_upload.js
302
297
  - app/assets/javascripts/fe/jquery.metadata.js
303
- - app/assets/javascripts/fe/jquery.scrollTo-min.js
304
298
  - app/assets/javascripts/fe/jquery.uploadify.v2.1.0.js
305
299
  - app/assets/javascripts/fe/jquery.validate.pack.js
306
300
  - app/assets/javascripts/fe/swfobject.js
307
- - app/assets/stylesheets/360front.css
308
301
  - app/assets/stylesheets/fe/fe.screen.css.scss.erb
309
302
  - app/assets/stylesheets/fe/reset.css
310
303
  - app/assets/stylesheets/fe/validation.css
304
+ - app/controllers/concerns/fe/admin/question_sheets_controller_concern.rb
305
+ - app/controllers/concerns/fe/answer_pages_controller_concern.rb
306
+ - app/controllers/concerns/fe/answer_sheets_controller_concern.rb
307
+ - app/controllers/concerns/fe/application_controller_concern.rb
311
308
  - app/controllers/fe/admin/elements_controller.rb
312
309
  - app/controllers/fe/admin/email_templates_controller.rb
313
310
  - app/controllers/fe/admin/question_pages_controller.rb
314
311
  - app/controllers/fe/admin/question_sheets_controller.rb
315
312
  - app/controllers/fe/answer_pages_controller.rb
316
313
  - app/controllers/fe/answer_sheets_controller.rb
317
- - app/controllers/fe/concerns/admin/question_sheets_controller_concern.rb
318
- - app/controllers/fe/concerns/answer_pages_controller_concern.rb
319
- - app/controllers/fe/concerns/answer_sheets_controller_concern.rb
320
- - app/controllers/fe/concerns/application_controller_concern.rb
321
314
  - app/controllers/fe/reference_pages_controller.rb
322
315
  - app/controllers/fe/reference_sheets_controller.rb
323
316
  - app/controllers/fe/references_controller.rb
324
317
  - app/controllers/fe/submit_pages_controller.rb
325
318
  - app/helpers/fe/answer_pages_helper.rb
326
319
  - app/helpers/fe/application_helper.rb
320
+ - app/jobs/fe/update_reference_sheet_visibility_job.rb
327
321
  - app/mailers/fe/notifier.rb
328
322
  - app/models/answer_sheet.rb
323
+ - app/models/application_record.rb
324
+ - app/models/concerns/fe/answer_concern.rb
325
+ - app/models/concerns/fe/answer_pages_presenter_concern.rb
326
+ - app/models/concerns/fe/answer_sheet_concern.rb
327
+ - app/models/concerns/fe/choice_field_concern.rb
329
328
  - app/models/fe/address.rb
330
329
  - app/models/fe/answer.rb
331
330
  - app/models/fe/answer_pages_presenter.rb
@@ -334,10 +333,6 @@ files:
334
333
  - app/models/fe/application.rb
335
334
  - app/models/fe/attachment_field.rb
336
335
  - app/models/fe/choice_field.rb
337
- - app/models/fe/concerns/answer_concern.rb
338
- - app/models/fe/concerns/answer_pages_presenter_concern.rb
339
- - app/models/fe/concerns/answer_sheet_concern.rb
340
- - app/models/fe/concerns/choice_field_concern.rb
341
336
  - app/models/fe/condition.rb
342
337
  - app/models/fe/current_address.rb
343
338
  - app/models/fe/date_field.rb
@@ -366,6 +361,124 @@ files:
366
361
  - app/models/fe/user.rb
367
362
  - app/models/staff.rb
368
363
  - app/validators/email_validator.rb
364
+ - app/views.current/fe/admin/elements/_errors.html.erb
365
+ - app/views.current/fe/admin/elements/create.js.erb
366
+ - app/views.current/fe/admin/elements/destroy.js.erb
367
+ - app/views.current/fe/admin/elements/drop.js.erb
368
+ - app/views.current/fe/admin/elements/duplicate.js.erb
369
+ - app/views.current/fe/admin/elements/edit.js.erb
370
+ - app/views.current/fe/admin/elements/error.js.erb
371
+ - app/views.current/fe/admin/elements/new.js.erb
372
+ - app/views.current/fe/admin/elements/reorder.js.erb
373
+ - app/views.current/fe/admin/elements/update.js.erb
374
+ - app/views.current/fe/admin/email_templates/_form.html.erb
375
+ - app/views.current/fe/admin/email_templates/edit.html.erb
376
+ - app/views.current/fe/admin/email_templates/index.html.erb
377
+ - app/views.current/fe/admin/email_templates/new.html.erb
378
+ - app/views.current/fe/admin/panels/_advanced_options.html.erb
379
+ - app/views.current/fe/admin/panels/_common_boolean_fields.html.erb
380
+ - app/views.current/fe/admin/panels/_common_boolean_fields_default.html.erb
381
+ - app/views.current/fe/admin/panels/_common_fields.html.erb
382
+ - app/views.current/fe/admin/panels/_condition.html.erb
383
+ - app/views.current/fe/admin/panels/_insert.html.erb
384
+ - app/views.current/fe/admin/panels/_nav_controls.html.erb
385
+ - app/views.current/fe/admin/panels/_page.html.erb
386
+ - app/views.current/fe/admin/panels/_pages_list.html.erb
387
+ - app/views.current/fe/admin/panels/_prop_attachment_field.html.erb
388
+ - app/views.current/fe/admin/panels/_prop_choice_field.html.erb
389
+ - app/views.current/fe/admin/panels/_prop_date_field.html.erb
390
+ - app/views.current/fe/admin/panels/_prop_element.html.erb
391
+ - app/views.current/fe/admin/panels/_prop_page.html.erb
392
+ - app/views.current/fe/admin/panels/_prop_paragraph.html.erb
393
+ - app/views.current/fe/admin/panels/_prop_question_grid.html.erb
394
+ - app/views.current/fe/admin/panels/_prop_question_grid_with_total.html.erb
395
+ - app/views.current/fe/admin/panels/_prop_reference_question.html.erb
396
+ - app/views.current/fe/admin/panels/_prop_section.html.erb
397
+ - app/views.current/fe/admin/panels/_prop_sheet.html.erb
398
+ - app/views.current/fe/admin/panels/_prop_text_field.html.erb
399
+ - app/views.current/fe/admin/question_pages/_element.html.erb
400
+ - app/views.current/fe/admin/question_pages/_element_show.html.erb
401
+ - app/views.current/fe/admin/question_pages/_errors.html.erb
402
+ - app/views.current/fe/admin/question_pages/_question_page.html.erb
403
+ - app/views.current/fe/admin/question_pages/create.js.erb
404
+ - app/views.current/fe/admin/question_pages/destroy.js.erb
405
+ - app/views.current/fe/admin/question_pages/edit.js.erb
406
+ - app/views.current/fe/admin/question_pages/error.js.erb
407
+ - app/views.current/fe/admin/question_pages/show.js.erb
408
+ - app/views.current/fe/admin/question_pages/show_panel.js.erb
409
+ - app/views.current/fe/admin/question_pages/update.js.erb
410
+ - app/views.current/fe/admin/question_sheets/_errors.html.erb
411
+ - app/views.current/fe/admin/question_sheets/edit.js.erb
412
+ - app/views.current/fe/admin/question_sheets/error.js.erb
413
+ - app/views.current/fe/admin/question_sheets/index.html.erb
414
+ - app/views.current/fe/admin/question_sheets/new.html.erb
415
+ - app/views.current/fe/admin/question_sheets/show.html.erb
416
+ - app/views.current/fe/admin/question_sheets/update.js.erb
417
+ - app/views.current/fe/answer_pages/_answer_page.html.erb
418
+ - app/views.current/fe/answer_pages/_element.html.erb
419
+ - app/views.current/fe/answer_pages/_page_name.html.erb
420
+ - app/views.current/fe/answer_pages/show.html.erb
421
+ - app/views.current/fe/answer_pages/update.js.erb
422
+ - app/views.current/fe/answer_sheets/_answer_sheet.html.erb
423
+ - app/views.current/fe/answer_sheets/_element.html.erb
424
+ - app/views.current/fe/answer_sheets/_incomplete.html.erb
425
+ - app/views.current/fe/answer_sheets/_page_link.html.erb
426
+ - app/views.current/fe/answer_sheets/_pages_list.html.erb
427
+ - app/views.current/fe/answer_sheets/_submit_to.html.erb
428
+ - app/views.current/fe/answer_sheets/_title.html.erb
429
+ - app/views.current/fe/answer_sheets/edit.html.erb
430
+ - app/views.current/fe/answer_sheets/incomplete.js.erb
431
+ - app/views.current/fe/answer_sheets/index.html.erb
432
+ - app/views.current/fe/answer_sheets/send_reference_invite.js.erb
433
+ - app/views.current/fe/answer_sheets/show.html.erb
434
+ - app/views.current/fe/applications/_logout.html.erb
435
+ - app/views.current/fe/applications/show.html.erb
436
+ - app/views.current/fe/help/builder.html
437
+ - app/views.current/fe/help/question_grid.html
438
+ - app/views.current/fe/questions/fe/_acceptance.html.erb
439
+ - app/views.current/fe/questions/fe/_attachment_field.html.erb
440
+ - app/views.current/fe/questions/fe/_checkbox_field.html.erb
441
+ - app/views.current/fe/questions/fe/_country.html.erb
442
+ - app/views.current/fe/questions/fe/_date_field.html.erb
443
+ - app/views.current/fe/questions/fe/_date_field_mmyy.html.erb
444
+ - app/views.current/fe/questions/fe/_drop_down_field.html.erb
445
+ - app/views.current/fe/questions/fe/_paragraph.html.erb
446
+ - app/views.current/fe/questions/fe/_question_grid.html.erb
447
+ - app/views.current/fe/questions/fe/_question_grid_with_total.html.erb
448
+ - app/views.current/fe/questions/fe/_questions.html.erb
449
+ - app/views.current/fe/questions/fe/_radio_button_field.html.erb
450
+ - app/views.current/fe/questions/fe/_rating.html.erb
451
+ - app/views.current/fe/questions/fe/_reference_discipler.html.erb
452
+ - app/views.current/fe/questions/fe/_reference_friend.html.erb
453
+ - app/views.current/fe/questions/fe/_reference_parent.html.erb
454
+ - app/views.current/fe/questions/fe/_reference_peer.html.erb
455
+ - app/views.current/fe/questions/fe/_reference_question.html.erb
456
+ - app/views.current/fe/questions/fe/_reference_roommate.html.erb
457
+ - app/views.current/fe/questions/fe/_reference_spiritual.html.erb
458
+ - app/views.current/fe/questions/fe/_reference_staff.html.erb
459
+ - app/views.current/fe/questions/fe/_section.html.erb
460
+ - app/views.current/fe/questions/fe/_state_chooser.html.erb
461
+ - app/views.current/fe/questions/fe/_text_area_field.html.erb
462
+ - app/views.current/fe/questions/fe/_text_field.html.erb
463
+ - app/views.current/fe/questions/fe/_yes_no.html.erb
464
+ - app/views.current/fe/questions/fe/_yes_no_field.erb
465
+ - app/views.current/fe/reference_pages/_reference.html.erb
466
+ - app/views.current/fe/reference_pages/edit.html.erb
467
+ - app/views.current/fe/reference_sheets/done.html.erb
468
+ - app/views.current/fe/reference_sheets/not_found.html.erb
469
+ - app/views.current/fe/reference_sheets/submitted.js.erb
470
+ - app/views.current/fe/references/edit.html.erb
471
+ - app/views.current/fe/references/send_invite.js.erb
472
+ - app/views.current/fe/references/show.html.erb
473
+ - app/views.current/fe/references/submit.js.erb
474
+ - app/views.current/fe/submit_pages/_errors.html.erb
475
+ - app/views.current/fe/submit_pages/_thankyou.html.erb
476
+ - app/views.current/fe/submit_pages/edit.html.erb
477
+ - app/views.current/fe/submit_pages/error.js.erb
478
+ - app/views.current/fe/submit_pages/submit.js.erb
479
+ - app/views.current/layouts/fe/_error_messages_for.html.erb
480
+ - app/views.current/layouts/fe/application.html.erb
481
+ - app/views.current/layouts/fe/fe_admin.html.erb
369
482
  - app/views/fe/admin/elements/_errors.html.erb
370
483
  - app/views/fe/admin/elements/create.js.erb
371
484
  - app/views/fe/admin/elements/destroy.js.erb
@@ -381,6 +494,8 @@ files:
381
494
  - app/views/fe/admin/email_templates/index.html.erb
382
495
  - app/views/fe/admin/email_templates/new.html.erb
383
496
  - app/views/fe/admin/panels/_advanced_options.html.erb
497
+ - app/views/fe/admin/panels/_common_boolean_fields.html.erb
498
+ - app/views/fe/admin/panels/_common_boolean_fields_default.html.erb
384
499
  - app/views/fe/admin/panels/_common_fields.html.erb
385
500
  - app/views/fe/admin/panels/_condition.html.erb
386
501
  - app/views/fe/admin/panels/_insert.html.erb
@@ -420,6 +535,7 @@ files:
420
535
  - app/views/fe/answer_pages/_answer_page.html.erb
421
536
  - app/views/fe/answer_pages/_element.html.erb
422
537
  - app/views/fe/answer_pages/_page_name.html.erb
538
+ - app/views/fe/answer_pages/show.html.erb
423
539
  - app/views/fe/answer_pages/update.js.erb
424
540
  - app/views/fe/answer_sheets/_answer_sheet.html.erb
425
541
  - app/views/fe/answer_sheets/_element.html.erb
@@ -480,7 +596,8 @@ files:
480
596
  - app/views/fe/submit_pages/submit.js.erb
481
597
  - app/views/layouts/fe/_error_messages_for.html.erb
482
598
  - app/views/layouts/fe/application.html.erb
483
- - app/views/layouts/fe/fe.admin.html.erb
599
+ - app/views/layouts/fe/fe_admin.html.erb
600
+ - config/initializers/paper_trail.rb
484
601
  - config/locales/en.yml
485
602
  - config/routes.rb
486
603
  - db/migrate/20131003041856_core.rb
@@ -501,8 +618,15 @@ files:
501
618
  - db/migrate/20150504221439_add_all_element_ids_to_pages.rb
502
619
  - db/migrate/20150713022326_add_locale_columns.rb
503
620
  - db/migrate/20150714220730_add_locale_to_answer_sheet.rb
621
+ - db/migrate/20150925181652_add_share_to_elements.rb
504
622
  - db/migrate/20150928085325_change_pages_all_element_ids_to_text.rb
505
623
  - db/migrate/20150930191538_add_locale_to_reference_sheets.rb
624
+ - db/migrate/20151021181928_switch_conditional_answer_separator_to_semicolon.rb
625
+ - db/migrate/20151021184250_add_question_sheet_id_in_refs.rb
626
+ - db/migrate/20160201185838_add_visible_and_visibility_cache_key_to_reference_sheets.rb
627
+ - db/migrate/20160805221415_add_rating_extra_labels.rb
628
+ - db/migrate/20181108201746_create_versions.rb
629
+ - db/migrate/20181218201130_increase_slug_length.rb
506
630
  - db/seeds.rb
507
631
  - lib/access_key_generator.rb
508
632
  - lib/distinct_distinct_patch.rb
@@ -522,6 +646,7 @@ files:
522
646
  - spec/controllers/fe/submit_pages_controller_spec.rb
523
647
  - spec/dummy/README.rdoc
524
648
  - spec/dummy/Rakefile
649
+ - spec/dummy/app/assets/config/manifest.js
525
650
  - spec/dummy/app/assets/javascripts/application.js
526
651
  - spec/dummy/app/assets/stylesheets/application.css
527
652
  - spec/dummy/app/controllers/application_controller.rb
@@ -549,6 +674,8 @@ files:
549
674
  - spec/dummy/config/initializers/inflections.rb
550
675
  - spec/dummy/config/initializers/mime_types.rb
551
676
  - spec/dummy/config/initializers/session_store.rb
677
+ - spec/dummy/config/initializers/to_unsafe_h.rb
678
+ - spec/dummy/config/initializers/to_unsafe_h.rb.new
552
679
  - spec/dummy/config/initializers/wrap_parameters.rb
553
680
  - spec/dummy/config/locales/en.yml
554
681
  - spec/dummy/config/routes.rb
@@ -562,7 +689,6 @@ files:
562
689
  - spec/dummy/db/migrate/20141203214023_remove_question_id_from_element.fe_engine.rb
563
690
  - spec/dummy/db/migrate/20141203214024_create_fe_people.fe_engine.rb
564
691
  - spec/dummy/db/migrate/20141203214025_create_fe_addresses.fe_engine.rb
565
- - spec/dummy/db/migrate/20141203214026_create_create_fe_phone_numbers.fe_engine.rb
566
692
  - spec/dummy/db/migrate/20141203214027_create_fe_users.fe_engine.rb
567
693
  - spec/dummy/db/migrate/20141203214028_add_conditional_type_to_elements.fe_engine.rb
568
694
  - spec/dummy/db/migrate/20141203214029_add_conditional_answer_to_elements.fe_engine.rb
@@ -570,13 +696,17 @@ files:
570
696
  - spec/dummy/db/migrate/20141203214031_move_conditional_ids_used_for_choice_field_to_their_own_column.fe_engine.rb
571
697
  - spec/dummy/db/migrate/20150123215803_create_users.rb
572
698
  - spec/dummy/db/migrate/20150504222619_add_all_element_ids_to_pages.fe_engine.rb
699
+ - spec/dummy/db/migrate/20150925192557_add_share_to_elements.fe_engine.rb
573
700
  - spec/dummy/db/migrate/20150930190001_create_fe_phone_numbers.fe_engine.rb
574
701
  - spec/dummy/db/migrate/20150930190002_add_locale_columns.fe_engine.rb
575
702
  - spec/dummy/db/migrate/20150930190003_add_locale_to_answer_sheet.fe_engine.rb
576
703
  - spec/dummy/db/migrate/20150930190004_change_pages_all_element_ids_to_text.fe_engine.rb
577
704
  - spec/dummy/db/migrate/20150930191756_add_locale_to_reference_sheets.fe_engine.rb
705
+ - spec/dummy/db/migrate/20151021190027_add_question_sheet_id_in_refs.fe_engine.rb
706
+ - spec/dummy/db/migrate/20160204164612_switch_conditional_answer_separator_to_semicolon.fe_engine.rb
707
+ - spec/dummy/db/migrate/20160204164613_add_visible_and_visibility_cache_key_to_reference_sheets.fe_engine.rb
708
+ - spec/dummy/db/migrate/20181108201746_create_versions.rb
578
709
  - spec/dummy/db/schema.rb
579
- - spec/dummy/log/development.log
580
710
  - spec/dummy/log/test.log
581
711
  - spec/dummy/public/404.html
582
712
  - spec/dummy/public/422.html
@@ -603,6 +733,7 @@ files:
603
733
  - spec/factories/question_sheet.rb
604
734
  - spec/factories/reference_questions.rb
605
735
  - spec/factories/reference_sheets.rb
736
+ - spec/jobs/fe/update_reference_sheet_visibility_job_spec.rb
606
737
  - spec/mailers/fe/notifier_spec.rb
607
738
  - spec/models/fe/answer_sheet_question_sheet_spec.rb
608
739
  - spec/models/fe/answer_spec.rb
@@ -636,7 +767,7 @@ files:
636
767
  homepage: http://cru.org
637
768
  licenses: []
638
769
  metadata: {}
639
- post_install_message:
770
+ post_install_message:
640
771
  rdoc_options: []
641
772
  require_paths:
642
773
  - lib
@@ -651,9 +782,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
651
782
  - !ruby/object:Gem::Version
652
783
  version: '0'
653
784
  requirements: []
654
- rubyforge_project:
655
- rubygems_version: 2.4.5
656
- signing_key:
785
+ rubyforge_project:
786
+ rubygems_version: 2.7.3
787
+ signing_key:
657
788
  specification_version: 4
658
789
  summary: Form Engine
659
790
  test_files:
@@ -667,6 +798,9 @@ test_files:
667
798
  - spec/controllers/fe/reference_sheets_controller_spec.rb
668
799
  - spec/controllers/fe/references_controller_spec.rb
669
800
  - spec/controllers/fe/submit_pages_controller_spec.rb
801
+ - spec/dummy/README.rdoc
802
+ - spec/dummy/Rakefile
803
+ - spec/dummy/app/assets/config/manifest.js
670
804
  - spec/dummy/app/assets/javascripts/application.js
671
805
  - spec/dummy/app/assets/stylesheets/application.css
672
806
  - spec/dummy/app/controllers/application_controller.rb
@@ -693,6 +827,8 @@ test_files:
693
827
  - spec/dummy/config/initializers/inflections.rb
694
828
  - spec/dummy/config/initializers/mime_types.rb
695
829
  - spec/dummy/config/initializers/session_store.rb
830
+ - spec/dummy/config/initializers/to_unsafe_h.rb
831
+ - spec/dummy/config/initializers/to_unsafe_h.rb.new
696
832
  - spec/dummy/config/initializers/wrap_parameters.rb
697
833
  - spec/dummy/config/locales/en.yml
698
834
  - spec/dummy/config/routes.rb
@@ -707,7 +843,6 @@ test_files:
707
843
  - spec/dummy/db/migrate/20141203214023_remove_question_id_from_element.fe_engine.rb
708
844
  - spec/dummy/db/migrate/20141203214024_create_fe_people.fe_engine.rb
709
845
  - spec/dummy/db/migrate/20141203214025_create_fe_addresses.fe_engine.rb
710
- - spec/dummy/db/migrate/20141203214026_create_create_fe_phone_numbers.fe_engine.rb
711
846
  - spec/dummy/db/migrate/20141203214027_create_fe_users.fe_engine.rb
712
847
  - spec/dummy/db/migrate/20141203214028_add_conditional_type_to_elements.fe_engine.rb
713
848
  - spec/dummy/db/migrate/20141203214029_add_conditional_answer_to_elements.fe_engine.rb
@@ -715,20 +850,22 @@ test_files:
715
850
  - spec/dummy/db/migrate/20141203214031_move_conditional_ids_used_for_choice_field_to_their_own_column.fe_engine.rb
716
851
  - spec/dummy/db/migrate/20150123215803_create_users.rb
717
852
  - spec/dummy/db/migrate/20150504222619_add_all_element_ids_to_pages.fe_engine.rb
853
+ - spec/dummy/db/migrate/20150925192557_add_share_to_elements.fe_engine.rb
718
854
  - spec/dummy/db/migrate/20150930190001_create_fe_phone_numbers.fe_engine.rb
719
855
  - spec/dummy/db/migrate/20150930190002_add_locale_columns.fe_engine.rb
720
856
  - spec/dummy/db/migrate/20150930190003_add_locale_to_answer_sheet.fe_engine.rb
721
857
  - spec/dummy/db/migrate/20150930190004_change_pages_all_element_ids_to_text.fe_engine.rb
722
858
  - spec/dummy/db/migrate/20150930191756_add_locale_to_reference_sheets.fe_engine.rb
859
+ - spec/dummy/db/migrate/20151021190027_add_question_sheet_id_in_refs.fe_engine.rb
860
+ - spec/dummy/db/migrate/20160204164612_switch_conditional_answer_separator_to_semicolon.fe_engine.rb
861
+ - spec/dummy/db/migrate/20160204164613_add_visible_and_visibility_cache_key_to_reference_sheets.fe_engine.rb
862
+ - spec/dummy/db/migrate/20181108201746_create_versions.rb
723
863
  - spec/dummy/db/schema.rb
724
- - spec/dummy/log/development.log
725
864
  - spec/dummy/log/test.log
726
865
  - spec/dummy/public/404.html
727
866
  - spec/dummy/public/422.html
728
867
  - spec/dummy/public/500.html
729
868
  - spec/dummy/public/favicon.ico
730
- - spec/dummy/Rakefile
731
- - spec/dummy/README.rdoc
732
869
  - spec/factories/answer_sheet_question_sheets.rb
733
870
  - spec/factories/answer_sheets.rb
734
871
  - spec/factories/answers.rb
@@ -750,6 +887,7 @@ test_files:
750
887
  - spec/factories/question_sheet.rb
751
888
  - spec/factories/reference_questions.rb
752
889
  - spec/factories/reference_sheets.rb
890
+ - spec/jobs/fe/update_reference_sheet_visibility_job_spec.rb
753
891
  - spec/mailers/fe/notifier_spec.rb
754
892
  - spec/models/fe/answer_sheet_question_sheet_spec.rb
755
893
  - spec/models/fe/answer_spec.rb
@@ -1,7 +0,0 @@
1
- /**
2
- * Copyright (c) 2007-2013 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
3
- * Dual licensed under MIT and GPL.
4
- * @author Ariel Flesler
5
- * @version 1.4.6
6
- */
7
- ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,targ,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
@@ -1,84 +0,0 @@
1
- module Fe::AnswerPagesControllerConcern
2
- extend ActiveSupport::Concern
3
-
4
- begin
5
- included do
6
- before_filter :get_answer_sheet, :only => [:edit, :update, :save_file, :index]
7
- end
8
- rescue ActiveSupport::Concern::MultipleIncludedBlocks
9
- end
10
-
11
- def edit
12
- @elements = @presenter.questions_for_page(params[:id]).elements
13
- @page = Fe::Page.find(params[:id]) || Fe::Page.find_by_number(1)
14
-
15
- render :partial => 'answer_page', :locals => { :show_first => nil }
16
- end
17
-
18
- # validate and save captured data for a given page
19
- # PUT /answer_sheets/1/pages/1
20
- def update
21
- @page = Fe::Page.find(params[:id])
22
- questions = @presenter.all_questions_for_page(params[:id])
23
- questions.post(answer_params, @answer_sheet)
24
-
25
- questions.save
26
-
27
- @elements = questions.elements
28
-
29
- # Save references
30
-
31
- if params[:reference].present?
32
- params[:reference].keys.each do |id|
33
- reference_params = params.fetch(:reference)[id].permit(:relationship, :title, :first_name, :last_name, :phone, :email, :is_staff)
34
-
35
- ref = @answer_sheet.reference_sheets.find(id)
36
- # if the email address has changed, we have to trash the old reference answers
37
- ref.attributes = reference_params
38
- ref.save(:validate => false)
39
- end
40
- end
41
- @presenter.active_page = nil
42
- @answer_sheet.update(locale: session[:locale])
43
- @saved_at_timestamp = [@answer_sheet.updated_at, @answer_sheet.answers.maximum(:updated_at)].compact.max
44
- respond_to do |format|
45
- format.js
46
- #format.html
47
- end
48
- end
49
-
50
- def save_file
51
- params.permit(:Filedata)
52
-
53
- if params[:Filedata]
54
- @page = Fe::Page.find(params[:id])
55
- @presenter.active_page = @page
56
- question = Fe::Element.find(params[:question_id])
57
- answer = Fe::Answer.where(:answer_sheet_id => @answer_sheet.id, :question_id => question.id).first
58
- question.answers = [answer] if answer
59
-
60
- @answer = question.save_file(@answer_sheet, params[:Filedata])
61
-
62
- render action: :update
63
- else
64
- respond_to do |format|
65
- format.js { head :ok }
66
- end
67
- end
68
- end
69
-
70
- protected
71
-
72
- def get_answer_sheet
73
- @answer_sheet = answer_sheet_type.find(params[:answer_sheet_id])
74
- @presenter = Fe::AnswerPagesPresenter.new(self, @answer_sheet, params[:a])
75
- end
76
-
77
- def answer_sheet_type
78
- (params[:answer_sheet_type] || Fe.answer_sheet_class || 'AnswerSheet').constantize
79
- end
80
-
81
- def answer_params
82
- params.fetch(:answers, {}).permit!
83
- end
84
- end