codeforlife-portal 5.33.5__py2.py3-none-any.whl → 8.9.9__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. cfl_common/common/__init__.py +1 -0
  2. cfl_common/common/app_settings.py +66 -0
  3. cfl_common/common/apps.py +6 -0
  4. cfl_common/common/context_processors.py +9 -0
  5. cfl_common/common/csp_config.py +85 -0
  6. cfl_common/common/helpers/__init__.py +0 -0
  7. cfl_common/common/helpers/data_migration_loader.py +42 -0
  8. cfl_common/common/helpers/emails.py +393 -0
  9. cfl_common/common/helpers/generators.py +52 -0
  10. cfl_common/common/helpers/organisation.py +10 -0
  11. cfl_common/common/mail.py +201 -0
  12. cfl_common/common/migrations/0001_initial.py +240 -0
  13. cfl_common/common/migrations/0002_emailverification.py +55 -0
  14. cfl_common/common/migrations/0003_aimmocharacter.py +31 -0
  15. cfl_common/common/migrations/0004_add_aimmocharacters.py +17 -0
  16. cfl_common/common/migrations/0005_add_worksheets.py +8 -0
  17. cfl_common/common/migrations/0006_update_aimmo_character_image_path.py +17 -0
  18. cfl_common/common/migrations/0007_add_pdf_names_to_first_two_worksheets.py +8 -0
  19. cfl_common/common/migrations/0008_unlock_worksheet_3.py +11 -0
  20. cfl_common/common/migrations/0009_add_blocked_time_to_teacher_and_student.py +24 -0
  21. cfl_common/common/migrations/0010_remove_teacher_title.py +18 -0
  22. cfl_common/common/migrations/0011_student_login_id.py +18 -0
  23. cfl_common/common/migrations/0012_usersession.py +39 -0
  24. cfl_common/common/migrations/0013_class_school.py +42 -0
  25. cfl_common/common/migrations/0014_login_type.py +29 -0
  26. cfl_common/common/migrations/0015_dailyactivity.py +31 -0
  27. cfl_common/common/migrations/0016_joinreleasestudent.py +42 -0
  28. cfl_common/common/migrations/0017_copy_email_to_username.py +18 -0
  29. cfl_common/common/migrations/0018_update_aimmo_character_image_path.py +15 -0
  30. cfl_common/common/migrations/0019_aimmocharacter_alt.py +16 -0
  31. cfl_common/common/migrations/0020_class_is_active_and_null_access_code.py +23 -0
  32. cfl_common/common/migrations/0021_school_is_active.py +28 -0
  33. cfl_common/common/migrations/0022_school_cleanup.py +29 -0
  34. cfl_common/common/migrations/0023_userprofile_aimmo_badges.py +22 -0
  35. cfl_common/common/migrations/0024_teacher_invited_by.py +25 -0
  36. cfl_common/common/migrations/0025_schoolteacherinvitation.py +47 -0
  37. cfl_common/common/migrations/0026_teacher_remove_join_request.py +22 -0
  38. cfl_common/common/migrations/0027_class_created_by.py +25 -0
  39. cfl_common/common/migrations/0028_coding_club_downloads.py +23 -0
  40. cfl_common/common/migrations/0029_dynamicelement.py +22 -0
  41. cfl_common/common/migrations/0030_add_maintenance_banner.py +25 -0
  42. cfl_common/common/migrations/0031_improve_admin_panel.py +56 -0
  43. cfl_common/common/migrations/0032_dailyactivity_level_control_submits.py +18 -0
  44. cfl_common/common/migrations/0033_password_reset_tracking_fields.py +23 -0
  45. cfl_common/common/migrations/0034_dailyactivity_daily_school_student_lockout_reset.py +18 -0
  46. cfl_common/common/migrations/0035_rename_lockout_fields.py +27 -0
  47. cfl_common/common/migrations/0036_rename_awaiting_email_verification_userprofile_is_verified.py +17 -0
  48. cfl_common/common/migrations/0037_migrate_email_verification.py +21 -0
  49. cfl_common/common/migrations/0038_delete_emailverification.py +16 -0
  50. cfl_common/common/migrations/0039_copy_email_to_username.py +18 -0
  51. cfl_common/common/migrations/0040_school_county.py +18 -0
  52. cfl_common/common/migrations/0041_populate_gb_counties.py +27 -0
  53. cfl_common/common/migrations/0042_totalactivity.py +25 -0
  54. cfl_common/common/migrations/0043_add_total_activity.py +30 -0
  55. cfl_common/common/migrations/0044_update_activity_models.py +33 -0
  56. cfl_common/common/migrations/0045_otp.py +23 -0
  57. cfl_common/common/migrations/0046_alter_school_country.py +19 -0
  58. cfl_common/common/migrations/0047_delete_school_postcode.py +16 -0
  59. cfl_common/common/migrations/0048_unique_school_names.py +42 -0
  60. cfl_common/common/migrations/0049_anonymise_orphan_users.py +29 -0
  61. cfl_common/common/migrations/0050_anonymise_orphan_schools.py +30 -0
  62. cfl_common/common/migrations/0051_verify_returning_users.py +26 -0
  63. cfl_common/common/migrations/0052_add_cse_fields.py +68 -0
  64. cfl_common/common/migrations/0053_clean_class_data.py +24 -0
  65. cfl_common/common/migrations/0054_delete_aimmo_models.py +20 -0
  66. cfl_common/common/migrations/0055_alter_schoolteacherinvitation_token.py +18 -0
  67. cfl_common/common/migrations/0056_set_non_school_teachers_as_non_admins.py +25 -0
  68. cfl_common/common/migrations/0057_teacher_teacher__is_admin.py +19 -0
  69. cfl_common/common/migrations/0058_userprofile_google_refresh_token_and_more.py +24 -0
  70. cfl_common/common/migrations/__init__.py +0 -0
  71. cfl_common/common/models.py +557 -0
  72. cfl_common/common/permissions.py +84 -0
  73. cfl_common/common/tests/__init__.py +0 -0
  74. cfl_common/common/tests/test_migration_anonymise_orphan_schools.py +30 -0
  75. cfl_common/common/tests/test_migration_anonymise_orphan_users.py +30 -0
  76. cfl_common/common/tests/test_migration_blocked_time.py +15 -0
  77. cfl_common/common/tests/test_migration_remove_teacher_title.py +13 -0
  78. cfl_common/common/tests/test_migration_unique_school_names.py +33 -0
  79. cfl_common/common/tests/test_migration_verify_returning_users.py +59 -0
  80. cfl_common/common/tests/test_models.py +87 -0
  81. cfl_common/common/tests/utils/__init__.py +0 -0
  82. cfl_common/common/tests/utils/classes.py +38 -0
  83. cfl_common/common/tests/utils/email.py +67 -0
  84. cfl_common/common/tests/utils/organisation.py +41 -0
  85. cfl_common/common/tests/utils/student.py +123 -0
  86. cfl_common/common/tests/utils/teacher.py +73 -0
  87. cfl_common/common/tests/utils/user.py +27 -0
  88. cfl_common/common/utils.py +56 -0
  89. cfl_common/setup.py +61 -0
  90. codeforlife_portal-8.9.9.dist-info/METADATA +226 -0
  91. {codeforlife_portal-5.33.5.dist-info → codeforlife_portal-8.9.9.dist-info}/RECORD +339 -241
  92. {codeforlife_portal-5.33.5.dist-info → codeforlife_portal-8.9.9.dist-info}/WHEEL +1 -1
  93. codeforlife_portal-8.9.9.dist-info/licenses/LICENSE.md +3 -0
  94. {codeforlife_portal-5.33.5.dist-info → codeforlife_portal-8.9.9.dist-info}/top_level.txt +1 -0
  95. deploy/middleware/maintenance.py +25 -0
  96. deploy/middleware/screentime_warning.py +29 -0
  97. deploy/middleware/security.py +5 -6
  98. deploy/middleware/session_timeout.py +4 -2
  99. deploy/middleware/tmp_basic_auth.py +41 -0
  100. example_project/portal_test_settings.py +239 -0
  101. example_project/settings.py +156 -17
  102. example_project/urls.py +5 -6
  103. portal/__init__.py +1 -1
  104. portal/admin.py +142 -29
  105. portal/app_settings.py +8 -7
  106. portal/forms/dotmailer.py +6 -4
  107. portal/forms/invite_teacher.py +19 -10
  108. portal/forms/organisation.py +137 -68
  109. portal/forms/play.py +53 -98
  110. portal/forms/registration.py +70 -164
  111. portal/forms/teach.py +147 -121
  112. portal/handlers.py +1 -2
  113. portal/helpers/decorators.py +30 -10
  114. portal/helpers/password.py +86 -47
  115. portal/helpers/ratelimit.py +32 -15
  116. portal/helpers/regexes.py +5 -0
  117. portal/helpers/request_handlers.py +10 -0
  118. portal/migrations/0044_auto_20150430_0959.py +6 -2
  119. portal/mixins/__init__.py +1 -0
  120. portal/mixins/cron_mixin.py +12 -0
  121. portal/permissions/__init__.py +1 -0
  122. portal/permissions/is_cron_request_from_google.py +14 -0
  123. portal/static/portal/img/10_years_anniversary.png +0 -0
  124. portal/static/portal/img/RR_logo_grass_background.png +0 -0
  125. portal/static/portal/img/coding_club_hero.jpg +0 -0
  126. portal/static/portal/img/coding_club_python_pack.png +0 -0
  127. portal/static/portal/img/facebook.png +0 -0
  128. portal/static/portal/img/gitbook.png +0 -0
  129. portal/static/portal/img/howe_dell_1.png +0 -0
  130. portal/static/portal/img/howe_dell_2.png +0 -0
  131. portal/static/portal/img/howe_dell_3.png +0 -0
  132. portal/static/portal/img/logo_cfl.png +0 -0
  133. portal/static/portal/img/logo_cfl_powered.svg +35 -0
  134. portal/static/portal/img/logo_cfl_reminder_cards.jpg +0 -0
  135. portal/static/portal/img/logo_ocado_group.png +0 -0
  136. portal/static/portal/img/logo_python_den.svg +21 -0
  137. portal/static/portal/img/long_europe_map.png +0 -0
  138. portal/static/portal/img/python_den.png +0 -0
  139. portal/static/portal/img/python_den_banner.svg +26 -0
  140. portal/static/portal/img/rapid_router_landing_hero.png +0 -0
  141. portal/static/portal/img/rr_advanced.png +0 -0
  142. portal/static/portal/img/ten_year_map_pin.svg +1 -0
  143. portal/static/portal/img/thumbnail_educate_rapid_router.png +0 -0
  144. portal/static/portal/img/thumbnail_educate_resources.png +0 -0
  145. portal/static/portal/img/thumbnail_play_rapid_router.png +0 -0
  146. portal/static/portal/img/thumbnail_python_den.png +0 -0
  147. portal/static/portal/img/twitter.png +0 -0
  148. portal/static/portal/js/carouselCards.js +25 -0
  149. portal/static/portal/js/common.js +96 -1
  150. portal/static/portal/js/independentLogin.js +16 -0
  151. portal/static/portal/js/independentRegistration.js +86 -0
  152. portal/static/portal/js/levelControl.js +77 -0
  153. portal/static/portal/js/lib/jquery.min.js +2 -0
  154. portal/static/portal/js/organisation_manage.js +142 -14
  155. portal/static/portal/js/passwordStrength.js +154 -64
  156. portal/static/portal/js/resetPassword.js +23 -0
  157. portal/static/portal/js/riveted.min.js +238 -239
  158. portal/static/portal/js/school.js +13 -0
  159. portal/static/portal/js/studentLogin.js +16 -0
  160. portal/static/portal/js/teacherEditStudent.js +23 -0
  161. portal/static/portal/js/teacherLogin.js +16 -0
  162. portal/static/portal/js/tenYearMap.js +14 -0
  163. portal/static/portal/sass/colorbox.scss +0 -1
  164. portal/static/portal/sass/modules/_colours.scss +1 -0
  165. portal/static/portal/sass/modules/_levels.scss +1 -1
  166. portal/static/portal/sass/modules/_mixins.scss +21 -0
  167. portal/static/portal/sass/partials/_banners.scss +4 -177
  168. portal/static/portal/sass/partials/_buttons.scss +12 -15
  169. portal/static/portal/sass/partials/_carousel.scss +129 -0
  170. portal/static/portal/sass/partials/_footer.scss +21 -22
  171. portal/static/portal/sass/partials/_forms.scss +60 -5
  172. portal/static/portal/sass/partials/_grids.scss +34 -61
  173. portal/static/portal/sass/partials/_header.scss +28 -20
  174. portal/static/portal/sass/partials/_images.scss +292 -39
  175. portal/static/portal/sass/partials/_popup.scss +18 -15
  176. portal/static/portal/sass/partials/_tables.scss +12 -20
  177. portal/static/portal/sass/partials/_text.scss +6 -10
  178. portal/static/portal/sass/styles.scss +0 -1
  179. portal/static/portal/video/code for life .pdf +0 -0
  180. portal/strings/about.py +5 -0
  181. portal/strings/coding_club.py +9 -0
  182. portal/strings/play.py +6 -5
  183. portal/strings/teach.py +1 -1
  184. portal/strings/teacher_resources.py +2 -8
  185. portal/strings/ten_year_map.py +13 -0
  186. portal/templates/403.html +2 -2
  187. portal/templates/404.html +1 -1
  188. portal/templates/500.html +2 -2
  189. portal/templates/{captcha → django_recaptcha}/includes/js_v2_invisible.html +3 -3
  190. portal/templates/{captcha → django_recaptcha}/widget_v2_invisible.html +2 -2
  191. portal/templates/email.html +4 -2
  192. portal/templates/maintenance.html +34 -0
  193. portal/templates/portal/about.html +94 -62
  194. portal/templates/portal/base.html +176 -152
  195. portal/templates/portal/coding_club.html +100 -0
  196. portal/templates/portal/contribute.html +56 -52
  197. portal/templates/portal/email_invitation_sent.html +1 -1
  198. portal/templates/portal/email_style_template.html +374 -0
  199. portal/templates/portal/email_verification_failed.html +1 -1
  200. portal/templates/portal/email_verification_needed.html +9 -9
  201. portal/templates/portal/form_shapes.html +20 -8
  202. portal/templates/portal/getinvolved.html +6 -6
  203. portal/templates/portal/home.html +35 -10
  204. portal/templates/portal/home_learning.html +19 -19
  205. portal/templates/portal/locked_out.html +0 -1
  206. portal/templates/portal/locked_out_school_student.html +16 -0
  207. portal/templates/portal/login/independent_student.html +31 -15
  208. portal/templates/portal/login/student.html +10 -7
  209. portal/templates/portal/login/student_class_code.html +7 -4
  210. portal/templates/portal/login/teacher.html +34 -17
  211. portal/templates/portal/partials/banner.html +18 -4
  212. portal/templates/portal/partials/benefits.html +1 -1
  213. portal/templates/portal/partials/card_list.html +34 -24
  214. portal/templates/portal/partials/character_list.html +5 -5
  215. portal/templates/portal/partials/cookie_list.html +161 -0
  216. portal/templates/portal/partials/delete_popup.html +18 -0
  217. portal/templates/portal/partials/footer.html +57 -26
  218. portal/templates/portal/partials/header.html +118 -117
  219. portal/templates/portal/partials/hero_card.html +4 -3
  220. portal/templates/portal/partials/info_popup.html +3 -3
  221. portal/templates/portal/partials/invite_admin_teacher.html +23 -0
  222. portal/templates/portal/partials/popup.html +7 -2
  223. portal/templates/portal/partials/register_newsletter_tickbox.html +2 -5
  224. portal/templates/portal/partials/screentime_popup.html +14 -0
  225. portal/templates/portal/partials/service_unavailable_popup.html +17 -0
  226. portal/templates/portal/partials/session_popup.html +19 -0
  227. portal/templates/portal/play/student_dashboard.html +42 -29
  228. portal/templates/portal/play/student_edit_account.html +64 -9
  229. portal/templates/portal/play.html +61 -41
  230. portal/templates/portal/privacy_notice.html +697 -0
  231. portal/templates/portal/register.html +122 -92
  232. portal/templates/portal/reset_password.html +20 -40
  233. portal/templates/portal/reset_password_confirm.html +9 -4
  234. portal/templates/portal/reset_password_email_sent.html +15 -13
  235. portal/templates/portal/teach/base_registering.html +1 -1
  236. portal/templates/portal/teach/class.html +4 -6
  237. portal/templates/portal/teach/dashboard.html +212 -117
  238. portal/templates/portal/teach/invited.html +90 -0
  239. portal/templates/portal/teach/onboarding_classes.html +5 -3
  240. portal/templates/portal/teach/onboarding_print.html +1 -1
  241. portal/templates/portal/teach/onboarding_school.html +26 -139
  242. portal/templates/portal/teach/onboarding_students.html +1 -1
  243. portal/templates/portal/teach/teacher_dismiss_students.html +73 -55
  244. portal/templates/portal/teach/teacher_edit_class.html +168 -11
  245. portal/templates/portal/teach/teacher_edit_student.html +12 -5
  246. portal/templates/portal/teach/teacher_move_all_classes.html +25 -38
  247. portal/templates/portal/teach/teacher_move_students_to_class.html +1 -1
  248. portal/templates/portal/teach.html +61 -42
  249. portal/templates/portal/ten_year_map.html +147 -0
  250. portal/templates/portal/terms.html +191 -42
  251. portal/templates/two_factor/core/login.html +71 -59
  252. portal/templates/two_factor/core/setup.html +58 -49
  253. portal/templates/two_factor/profile/disable.html +1 -1
  254. portal/templates/two_factor/profile/profile.html +35 -17
  255. portal/templatetags/app_tags.py +59 -84
  256. portal/templatetags/card_list_tags.py +0 -4
  257. portal/tests/base_test.py +14 -3
  258. portal/tests/conftest.py +0 -15
  259. portal/tests/migrations/test_migration_make_portaladmin_teacher.py +2 -6
  260. portal/tests/migrations/test_migration_preview_users.py +3 -9
  261. portal/tests/migrations/test_migration_remove_guardian.py +1 -3
  262. portal/tests/migrations/test_migration_use_common_models.py +2 -6
  263. portal/tests/migrations/test_migration_verify_portaladmin.py +1 -3
  264. portal/tests/pageObjects/portal/admin/admin_base_page.py +0 -21
  265. portal/tests/pageObjects/portal/base_page.py +16 -26
  266. portal/tests/pageObjects/portal/email_verification_needed_page.py +3 -2
  267. portal/tests/pageObjects/portal/game_page.py +12 -19
  268. portal/tests/pageObjects/portal/home_page.py +13 -15
  269. portal/tests/pageObjects/portal/independent_login_page.py +13 -17
  270. portal/tests/pageObjects/portal/password_reset_form_page.py +20 -4
  271. portal/tests/pageObjects/portal/password_reset_page.py +25 -0
  272. portal/tests/pageObjects/portal/play/account_page.py +18 -27
  273. portal/tests/pageObjects/portal/play/dashboard_page.py +4 -4
  274. portal/tests/pageObjects/portal/play/join_school_or_club_page.py +8 -10
  275. portal/tests/pageObjects/portal/play/play_base_page.py +5 -3
  276. portal/tests/pageObjects/portal/signup_page.py +28 -59
  277. portal/tests/pageObjects/portal/student_login_class_code.py +6 -9
  278. portal/tests/pageObjects/portal/student_login_page.py +6 -8
  279. portal/tests/pageObjects/portal/teach/add_independent_student_to_class_page.py +3 -3
  280. portal/tests/pageObjects/portal/teach/added_independent_student_to_class_page.py +3 -1
  281. portal/tests/pageObjects/portal/teach/class_page.py +36 -13
  282. portal/tests/pageObjects/portal/teach/dashboard_page.py +43 -84
  283. portal/tests/pageObjects/portal/teach/dismiss_students_page.py +7 -5
  284. portal/tests/pageObjects/portal/teach/edit_student_page.py +10 -8
  285. portal/tests/pageObjects/portal/teach/move_class_page.py +5 -10
  286. portal/tests/pageObjects/portal/teach/move_classes_page.py +4 -2
  287. portal/tests/pageObjects/portal/teach/move_students_disambiguate_page.py +4 -2
  288. portal/tests/pageObjects/portal/teach/move_students_page.py +6 -13
  289. portal/tests/pageObjects/portal/teach/onboarding_classes_page.py +5 -3
  290. portal/tests/pageObjects/portal/teach/onboarding_organisation_page.py +11 -49
  291. portal/tests/pageObjects/portal/teach/onboarding_student_list_page.py +7 -12
  292. portal/tests/pageObjects/portal/teach/onboarding_students_page.py +4 -27
  293. portal/tests/pageObjects/portal/teach/teach_base_page.py +6 -4
  294. portal/tests/pageObjects/portal/teacher_login_page.py +10 -16
  295. portal/tests/selenium_test_case.py +3 -43
  296. portal/tests/snapshots/snap_test_partials.py +11 -165
  297. portal/tests/test_2FA.py +15 -33
  298. portal/tests/test_admin.py +15 -97
  299. portal/tests/test_api.py +212 -91
  300. portal/tests/test_captcha_forms.py +2 -2
  301. portal/tests/test_class.py +374 -24
  302. portal/tests/test_emails.py +83 -20
  303. portal/tests/{test_newsletter_footer.py → test_global_forms.py} +5 -5
  304. portal/tests/test_helper_methods.py +30 -0
  305. portal/tests/test_independent_student.py +255 -144
  306. portal/tests/test_invite_teacher.py +318 -10
  307. portal/tests/test_middleware.py +96 -9
  308. portal/tests/test_organisation.py +78 -262
  309. portal/tests/test_partials.py +0 -88
  310. portal/tests/test_ratelimit.py +218 -36
  311. portal/tests/test_school_student.py +35 -40
  312. portal/tests/test_security.py +12 -31
  313. portal/tests/test_teacher.py +425 -325
  314. portal/tests/test_teacher_student.py +103 -91
  315. portal/tests/test_views.py +900 -76
  316. portal/tests/utils/classes.py +2 -2
  317. portal/tests/utils/messages.py +13 -28
  318. portal/urls.py +235 -166
  319. portal/views/admin.py +0 -332
  320. portal/views/api.py +82 -48
  321. portal/views/cron/__init__.py +1 -0
  322. portal/views/cron/user.py +322 -0
  323. portal/views/dotmailer.py +9 -1
  324. portal/views/email.py +33 -77
  325. portal/views/google_analytics.py +28 -0
  326. portal/views/home.py +126 -97
  327. portal/views/legal.py +13 -0
  328. portal/views/login/independent_student.py +5 -5
  329. portal/views/login/student.py +51 -14
  330. portal/views/login/teacher.py +2 -6
  331. portal/views/organisation.py +20 -189
  332. portal/views/registration.py +97 -17
  333. portal/views/student/edit_account_details.py +99 -72
  334. portal/views/student/play.py +81 -62
  335. portal/views/teacher/dashboard.py +421 -149
  336. portal/views/teacher/teach.py +226 -177
  337. portal/views/two_factor/core.py +22 -19
  338. portal/views/two_factor/profile.py +2 -2
  339. codeforlife_portal-5.33.5.dist-info/LICENSE.md +0 -577
  340. codeforlife_portal-5.33.5.dist-info/METADATA +0 -38
  341. deploy/permissions.py +0 -2
  342. example_project/manage.py +0 -10
  343. portal/autoconfig.py +0 -141
  344. portal/csp_config.py +0 -60
  345. portal/forms/add_game.py +0 -33
  346. portal/helpers/location.py +0 -121
  347. portal/static/portal/img/kurono_hero.jpg +0 -0
  348. portal/static/portal/img/kurono_landing_hero.png +0 -0
  349. portal/static/portal/img/kurono_logo.svg +0 -1
  350. portal/static/portal/img/kurono_logo_grey_background.svg +0 -1
  351. portal/static/portal/img/kurono_logo_mark.svg +0 -1
  352. portal/static/portal/img/kurono_resources_hero.jpg +0 -0
  353. portal/static/portal/img/kurono_story.png +0 -0
  354. portal/static/portal/img/ocado-swirl.svg +0 -22
  355. portal/static/portal/img/thumbnail_educate_kurono.png +0 -0
  356. portal/static/portal/img/thumbnail_educate_resources_and_progress_tracking.png +0 -0
  357. portal/static/portal/img/thumbnail_kurono_resources.png +0 -0
  358. portal/static/portal/img/thumbnail_play_kurono.png +0 -0
  359. portal/static/portal/img/x_close_video.png +0 -0
  360. portal/static/portal/js/aimmoGame.js +0 -106
  361. portal/static/portal/js/deleteWorkspaces.js +0 -14
  362. portal/static/portal/js/fuzzySchoolLookup.js +0 -46
  363. portal/static/portal/js/lib/jquery-3.5.1.min.js +0 -2
  364. portal/static/portal/js/lib/jquery-ui-1.12.1.min.js +0 -13
  365. portal/static/portal/sass/partials/_videos.scss +0 -10
  366. portal/static/portal/video/aimmo_play_now_background_video.mp4 +0 -0
  367. portal/strings/student_aimmo_dashboard.py +0 -6
  368. portal/templates/portal/admin/aggregated_data.html +0 -35
  369. portal/templates/portal/admin/map.html +0 -70
  370. portal/templates/portal/mouseflow.html +0 -9
  371. portal/templates/portal/partials/aimmo_games_table.html +0 -83
  372. portal/templates/portal/partials/register_over_required_age_tickbox.html +0 -9
  373. portal/templates/portal/play/independent_student_dashboard.html +0 -64
  374. portal/templates/portal/play/student_aimmo_dashboard.html +0 -63
  375. portal/templates/portal/privacy_policy.html +0 -483
  376. portal/templates/portal/reset_password_email.html +0 -9
  377. portal/templates/portal/teach/invite.html +0 -25
  378. portal/templates/portal/teach/teacher_aimmo_dashboard.html +0 -95
  379. portal/templates/portal/teach/teacher_resources.html +0 -68
  380. portal/templatetags/character_list_tags.py +0 -16
  381. portal/tests/pageObjects/portal/kurono_teacher_dashboard_page.py +0 -49
  382. portal/tests/pageObjects/portal/student_password_reset_form_page.py +0 -23
  383. portal/tests/pageObjects/portal/teach/onboarding_revoke_request_page.py +0 -20
  384. portal/tests/pageObjects/portal/teacher_password_reset_form_page.py +0 -23
  385. portal/tests/test_aimmo_dashboards.py +0 -172
  386. portal/tests/test_location.py +0 -217
  387. portal/tests/utils/aimmo_games.py +0 -30
  388. portal/views/aimmo/dashboard.py +0 -119
  389. portal/views/privacy_policy.py +0 -9
  390. portal/views/teacher/teacher_resources.py +0 -42
  391. {portal/views/aimmo → cfl_common}/__init__.py +0 -0
@@ -1,5 +1,5 @@
1
1
  {% extends 'portal/base.html' %}
2
- {% load staticfiles %}
2
+ {% load static %}
3
3
  {% load app_tags %}
4
4
 
5
5
  {% block subNav %}
@@ -8,16 +8,31 @@
8
8
  </section>
9
9
  <div class="sticky-subnav sub-nav sub-nav--teacher">
10
10
  <ul class="nav is-flex" role="tablist">
11
- <li class="active"><a class="button button--secondary button--secondary--light" data-toggle="tab" href="#introduction">Introduction</a></li>
12
- <li><a class="button button--secondary button--secondary--light" data-toggle="tab" href="#terms">Terms of use</a></li>
11
+ <li class="active"><a class="button button--secondary button--secondary--light" data-toggle="tab" href="#terms">Terms of use</a></li>
12
+ <li><a class="button button--secondary button--secondary--light" data-toggle="tab" href="#terms-children">Child-friendly</a></li>
13
13
  </ul>
14
14
  </div>
15
15
  {% endblock subNav %}
16
16
 
17
17
  {% block content %}
18
18
  <div class="tab-content background container">
19
- <div id="introduction" class="tab-pane active">
20
- <section><h4 id="introduction">Introduction</h4></section>
19
+ <div id="terms" class="tab-pane active">
20
+ <section><h4 id="terms-of-use">Terms of Use</h4></section>
21
+
22
+ <ol class="list--two-columns">
23
+ <li><p><a href="#introduction">Introduction</a></p></li>
24
+ <li><p><a href="#registration-and-types-of-membership">Registration and Types of Membership</a></p></li>
25
+ <li><p><a href="#misuse-of-code-for-life-site">Misuse of Code for Life site</a></p></li>
26
+ <li><p><a href="#prohibitions">Prohibitions</a></p></li>
27
+ <li><p><a href="#alerting-code-for-life">Alerting Code for Life</a></p></li>
28
+ <li><p><a href="#intellectual-property">Intellectual Property</a></p></li>
29
+ <li><p><a href="#our-liability">Our Liability</a></p></li>
30
+ <li><p><a href="#miscellaneous">Miscellaneous</a></p></li>
31
+ </ol>
32
+
33
+ <hr>
34
+
35
+ <h5 id="introduction">1. Introduction</h5>
21
36
  <div class="row d-flex">
22
37
  <div class="col-sm-6">
23
38
  <p>Ocado Innovation Limited (as &ldquo;Ocado Technology&rdquo;), the division that powers Ocado.com, the world&rsquo;s
@@ -28,7 +43,7 @@
28
43
  digital world.</p>
29
44
  <p>Ocado Innovation Limited is committed to protecting any data that we collect concerning you. By using
30
45
  our services on this website you are agreeing to the use of the data that we collect in accordance
31
- with the Privacy Policy and the Terms of Use (together, the &ldquo;Terms & Conditions&rdquo;), so please read
46
+ with the Privacy Notice and the Terms of Use (together, the &ldquo;Terms & Conditions&rdquo;), so please read
32
47
  these carefully.</p>
33
48
  </div>
34
49
  <div class="col-sm-6">
@@ -43,20 +58,6 @@
43
58
  Technology from time to time (collectively, &ldquo;Code for Life&rdquo;).</p>
44
59
  </div>
45
60
  </div>
46
- </div>
47
-
48
- <div id="terms" class="tab-pane">
49
- <section><h4 id="terms-of-use">Terms of Use</h4></section>
50
-
51
- <ol class="list--two-columns">
52
- <li><p><a href="#registration-and-types-of-membership">Registration and Types of Membership</a></p></li>
53
- <li><p><a href="#misuse-of-code-for-life-site">Misuse of Code for Life site</a></p></li>
54
- <li><p><a href="#prohibitions">Prohibitions</a></p></li>
55
- <li><p><a href="#alerting-code-for-life">Alerting Code for Life</a></p></li>
56
- <li><p><a href="#intellectual-property">Intellectual Property</a></p></li>
57
- <li><p><a href="#our-liability">Our Liability</a></p></li>
58
- <li><p><a href="#miscellaneous">Miscellaneous</a></p></li>
59
- </ol>
60
61
 
61
62
  <hr>
62
63
 
@@ -65,24 +66,25 @@
65
66
  <p><strong>Important: If you are under 13 years of age you must have your parent, guardian or carer&rsquo;s
66
67
  consent to register for a Code for Life account, and to use their email address. If you are using
67
68
  this at school, you must first have your teacher&rsquo;s permission to use this site. These Terms of Use
68
- were most recently updated on 27 December 2018.</strong></p>
69
- <p>Code for Life includes all versions of &ldquo;Rapid Router&rdquo;, &ldquo;Kurono&rdquo; and any other games, platforms and
70
- other products or services released by us (whether online or otherwise), from time to time,
71
- including all Code for Life websites used to play the games, platforms and any other products or
72
- services that we make available. &ldquo;Code for Life&rdquo; and &ldquo;Rapid Router&rdquo; are registered UK trade marks of
69
+ were most recently updated on {{ last_updated }}.</strong></p>
70
+ <p>Code for Life includes all versions of &ldquo;Rapid Router&rdquo;, &ldquo;Python Den&rdquo;,
71
+ &ldquo;Kurono&rdquo; and any other games, platforms and other products or services released by us
72
+ (whether online or otherwise), from time to time, including all Code for Life websites used to play
73
+ the games, platforms and any other products or services that we make available.
74
+ &ldquo;Code for Life&rdquo;, &ldquo;Rapid Router&rdquo; and "&ldquo;Kurono&rdquo;" are registered UK trademarks of
73
75
  Ocado Innovation Limited.</p>
74
- <p>You must take the time to read and understand the Terms of Use and the Privacy Policy before
76
+ <p>You must take the time to read and understand the Terms of Use and the Privacy Notice before
75
77
  registering for Code for Life.</p>
76
78
  </div>
77
79
  <div class="col-sm-6">
78
80
  <p><strong>By registering, you accept that you are entering into a contract with us in accordance with
79
- the Terms & Conditions and the Privacy Policy. Visitors to the Code for Life portal who do not
81
+ the Terms & Conditions and the Privacy Notice. Visitors to the Code for Life portal who do not
80
82
  register to become a User, similarly affirm that they are bound by the Terms & Conditions and the
81
- Privacy Policy each time they access the Code for Life site. We reserve the right to update the
83
+ Privacy Notice each time they access the Code for Life site. We reserve the right to update the
82
84
  Terms of Use at any time, so please check them periodically, as all changes will be binding on you
83
85
  provided that you use the website after they have been made. To assist you in determining whether
84
86
  the Terms & Conditions have changed since your most recent visit to the website, we will display the
85
- date when the Terms of Use and Privacy Policy were most recently updated.</strong></p>
87
+ date when the Terms of Use and Privacy Notice were most recently updated.</strong></p>
86
88
  <p><strong>Important: You must ensure that any email address we hold for you is kept up-to-date and that
87
89
  you have full access to it. Important notifications are sent to the email address you provide.
88
90
  Failure to keep this information updated can result in your Code for Life account being deleted
@@ -92,12 +94,12 @@
92
94
 
93
95
  <hr>
94
96
 
95
- <h5 id="registration-and-types-of-membership">1. Registration and Types of Membership</h5>
96
- <p><strong>Membership falls into the following categories under the Agreement outlined in this policy:</strong></p>
97
+ <h5 id="registration-and-types-of-membership">2. Registration and Types of Membership</h5>
98
+ <p><strong>Membership falls into the following categories under the Agreement outlined in this notice:</strong></p>
97
99
  <ul>
98
100
  <li><p>Administrators: person or persons assigned responsibility for the management and security of
99
101
  membership by other Users;</p></li>
100
- <li><p>Users: any person using the Code for Life website, Rapid Router, Kurono or any other game,
102
+ <li><p>Users: any person using the Code for Life website, Rapid Router, Python Den, Kurono or any other game,
101
103
  application or platform of ours regardless of membership;</p></li>
102
104
  <li><p>Students: Users who are provided with login information for Code for Life by a teacher, parent,
103
105
  guardian or carer;</p></li>
@@ -122,6 +124,18 @@
122
124
  <li><p>if you are accepting the Terms & Conditions on behalf of a school or club, you have the authority to
123
125
  bind that institution, company or legal entity to the Terms & Conditions.</p></li>
124
126
  </ul>
127
+ <p>The organisation Administrator is able to make other teachers in the organisation Administrators.</p>
128
+ <p><strong>All Administrators should be aware that:</strong></p>
129
+ <ul>
130
+ <li><p>they are able to access all the classes, and the students of those classes, within the organisation.
131
+ This also includes the students’ progress data, as well as any custom level created by colleagues or
132
+ students within the organisation.</p></li>
133
+ <li><p>they are able to manage (create, edit, transfer and remove) all the classes, students and levels
134
+ within the organisation; and</p></li>
135
+ <li><p>if there is only one Administrator in the organisation and that Administrator deletes their account,
136
+ the Administrator role will automatically be transferred to the next Teacher in the organisation.
137
+ </p></li>
138
+ </ul>
125
139
  <p>As a User, you further warrant that you will only grant access codes to teachers, staff members and students
126
140
  who are current employees or students known to your school or club. Upon termination of a teacher or other
127
141
  staff member&rsquo;s employment with you, you will ensure they assign over all existing classes and/or students to
@@ -136,12 +150,12 @@
136
150
  address.</p>
137
151
  <p>Please note that we are not an internet service provider. All Users of Code for Life must have internet
138
152
  access and the necessary software for email and web usage.</p>
139
- <p>Code for Life&rsquo;s Privacy Policy forms part of the Terms & Conditions, and your acceptance of the Terms &
140
- Conditions constitutes consent to the way we may handle your personal data as detailed in that policy.</p>
153
+ <p>Code for Life&rsquo;s Privacy Notice forms part of the Terms & Conditions, and your acceptance of the Terms &
154
+ Conditions constitutes consent to the way we may handle your personal data as detailed in that notice.</p>
141
155
 
142
156
  <hr>
143
157
 
144
- <h5 id="misuse-of-code-for-life-site">2. Misuse of Code for Life site</h5>
158
+ <h5 id="misuse-of-code-for-life-site">3. Misuse of Code for Life site</h5>
145
159
  <p>We reserve the right (a) to suspend or terminate any User&rsquo;s access to Code for Life, or parts of it, and/or
146
160
  (b) to remove, or require the User to remove, material posted on Code for Life, if the User or material
147
161
  appears to us, or to someone who has complained to us, to be in breach of any provision of the Terms &
@@ -177,7 +191,7 @@
177
191
 
178
192
  <hr>
179
193
 
180
- <h5 id="prohibitions">3. Prohibitions</h5>
194
+ <h5 id="prohibitions">4. Prohibitions</h5>
181
195
  <p>You must ensure that any activity and or communication through the Code for Life site, is not capable of (a)
182
196
  infringing the intellectual property or other rights of any person or entity, (b) breaching any applicable
183
197
  laws, regulations or codes of practice, whether criminal, tortuous or otherwise, (c) appearing to be
@@ -190,7 +204,7 @@
190
204
 
191
205
  <hr>
192
206
 
193
- <h5 id="alerting-code-for-life">4. Alerting Code for Life</h5>
207
+ <h5 id="alerting-code-for-life">5. Alerting Code for Life</h5>
194
208
  <p>If you see anything on the Code for Life portal which appears to infringe any part of the Terms & Conditions,
195
209
  then please inform us via the <a class="freshdesk__contact-us">Contact Us</a> section of this site.</p>
196
210
  <p>We do not endorse or take responsibility for the content of any third party sites that link to or from Code
@@ -198,10 +212,10 @@
198
212
 
199
213
  <hr>
200
214
 
201
- <h5 id="intellectual-property">5. Intellectual Property</h5>
215
+ <h5 id="intellectual-property">6. Intellectual Property</h5>
202
216
  <p>You acknowledge that all copyright, trademarks, and other intellectual property rights in and relating to
203
- Code for Life (including all content of the Code for Life website, the Rapid Router application, the Kurono
204
- application, related software (including any drawn and/or animated avatars, whether or not such avatars have
217
+ Code for Life (including all content of the Code for Life website, the Rapid Router application, the Python Den
218
+ application, the Kurono application, related software (including any drawn and/or animated avatars, whether or not such avatars have
205
219
  any modifications) and any other games, applications or any other content that we make available from time
206
220
  to time) are owned by Ocado Innovation Limited. These rights protect all of the applications, games,
207
221
  products and services you see on the Code for Life website from time to time, including the graphics of
@@ -212,7 +226,7 @@
212
226
 
213
227
  <hr>
214
228
 
215
- <h5 id="our-liability">6. Our Liability</h5>
229
+ <h5 id="our-liability">7. Our Liability</h5>
216
230
  <p>The website, use of the application and games, and access to any accounts is provided by us on an &ldquo;as is&rdquo;
217
231
  basis without any warranties or guarantees. We do not accept responsibility for any errors, omissions, or
218
232
  for the results obtained from the use of such information or for any technical problems you may experience
@@ -241,7 +255,7 @@
241
255
 
242
256
  <hr>
243
257
 
244
- <h5 id="miscellaneous">7. Miscellaneous</h5>
258
+ <h5 id="miscellaneous">8. Miscellaneous</h5>
245
259
  <p>The delay or failure of any party to exercise its rights provided for in these Terms & Conditions shall not
246
260
  be deemed a waiver of any further rights hereunder. If any provision of the Terms & Conditions is found to
247
261
  be unenforceable or invalid, that provision shall be limited or eliminated to the minimum extent necessary
@@ -249,6 +263,141 @@
249
263
  governed by and construed in accordance with the laws of England and Wales and the parties shall submit to
250
264
  the exclusive jurisdiction of the English courts.</p>
251
265
  </div>
266
+
267
+ <div id="terms-children" class="tab-pane">
268
+
269
+ <section><h4>Terms of Use</h4></section>
270
+
271
+ <div class="row d-flex">
272
+ <div class="col-sm-6">
273
+ <p><strong>We ask that you take the time to read and understand our Terms of Use and the Privacy Notice
274
+ before registering for Code for Life. These Terms were last updated on {{ last_updated }}.
275
+ </strong></p>
276
+ <p>Our Terms of Use set out the rules that we ask you to follow when using Code for Life. The rules
277
+ cover:</p>
278
+ <ul>
279
+ <li><p>all Code for Life websites used to play the games, platforms and any other products or
280
+ services that we make available to you</p></li>
281
+ <li><p>all versions of “Rapid Router”, “Python Den”, “Kurono” and any
282
+ other games, platforms and other products or
283
+ services we released (whether online or otherwise)</p></li>
284
+ </ul>
285
+ <p><strong>When you visit the Code for Life site or register with us you agree to follow these rules.</strong></p>
286
+ </div>
287
+ <div class="col-sm-6">
288
+ <p><strong>We may need to update our Terms of Use every now and then. If you have registered with us
289
+ then we will email you to tell you about any changes we’ve made. We’ll also post a message up on the
290
+ site so that any visitors will know that our Terms have changed. This page shows the date we last
291
+ made a change so you’ll always be able to check when the Terms were most recently updated.</strong></p>
292
+ <p><strong>Important: Please make sure to keep your email address up to date as we will use this to send
293
+ you important messages about Code for Life. If you don’t keep it updated then it could lead to your
294
+ access being restricted or your account deleted.</strong></p>
295
+ <p><strong>You should use the <a class="freshdesk__contact-us">Contact Us form</a> if you need help or
296
+ advice on how to use the site. Please be aware that we will never ask for personal information other
297
+ than what is required to identify your account and answer your questions, and we will never ask for
298
+ your password.</strong></p>
299
+ </div>
300
+ </div>
301
+
302
+ <hr>
303
+
304
+ <h5>1. Misuse of the Code for Life site</h5>
305
+
306
+ <p>Please remember that you are responsible for everything you do when logged onto the Code for Life site. If
307
+ you create content on Code for Life which we think breaks the rules of the Terms of Use then we may:</p>
308
+ <ol type="a">
309
+ <li><p>suspend or close your access Code for Life account, OR</p></li>
310
+ <li><p>block your access to parts of the site OR</p></li>
311
+ <li><p>remove (or ask you to remove) the post which we think broke the rules.</p></li>
312
+ </ol>
313
+ <p>If we have to suspend or close your account then you won’t be allowed to re-register or access the portal
314
+ again unless we have given you our permission in writing to do so.</p>
315
+
316
+ <p>We’ll do our best to make sure the Code for Life website and access to your account and our games, platforms
317
+ and other products or services is available to you 24 hours a day. However, we sometimes have to limit
318
+ users’ access to their account or the site so that we can make repairs or add new content.</p>
319
+
320
+ <p>We also aim to provide you with the best service we can, but we can’t promise that the Code for Life site, or
321
+ our games, platforms and services will always be fault, virus or mistake-free. If you notice a problem or
322
+ fault, please let us know using the <a class="freshdesk__contact-us">contact us form</a> and we will do all
323
+ we can to correct it as quickly as we can.</p>
324
+
325
+ <p>Whether or not a user follows the Terms of Use we still have the right to:</p>
326
+ <ol type="a">
327
+ <li><p>choose whether to accept or reject their registration</p></li>
328
+ <li><p>suspend and cancel their account at any time (without telling them first)</p></li>
329
+ <li><p>stop them from accessing all or part of the games, platforms and any other of our services (including
330
+ any old or live games or avatar(s) they’ve created).</p></li>
331
+ </ol>
332
+
333
+ <p><strong>The Code for Life portal was created to help you learn how to code, and this is the only purpose you
334
+ should use it for. This means that you may not:</strong></p>
335
+ <ul>
336
+ <li><p>post content on Code for life for business purposes or use the Code for Life site for a business
337
+ purpose OR</p></li>
338
+ <li><p>use the Code for Life site or information you’ve taken from it, to send out spam emails.</p></li>
339
+ </ul>
340
+
341
+ <hr>
342
+
343
+ <h5>2. Other limits of use</h5>
344
+
345
+ <p>You must not:</p>
346
+ <ol type="a">
347
+ <li><p>copy content taken from our site or copy content created by another Code for Life user without
348
+ permission,</p></li>
349
+ <li><p>break any laws when using the site,</p></li>
350
+ <li><p>create levels that contain offensive, threatening, harmful or false content,</p></li>
351
+ <li><p>use the site in a way that causes disruption to other users,</p></li>
352
+ <li><p>use the site in a way that helps someone to gain access to other computer systems that they do not
353
+ have permission to access,</p></li>
354
+ <li><p>use the site in a way that affects other peoples’ use or enjoyment of the Code for Life website,</p></li>
355
+ <li><p>do anything that could cause damage the site, for example taking action that allows in, computer
356
+ viruses, logic bombs, Trojan horses or some other kind of harmful software or data.</p></li>
357
+ </ol>
358
+
359
+ <hr>
360
+
361
+ <h5>3. Alerting Code for Life</h5>
362
+
363
+ <p>If you see anything on the Code for Life portal which you think breaks the rules in our Terms of Use, then
364
+ please let us know by using the Contact Us section of the site.</p>
365
+
366
+ <p>The Code for Life site has links to websites that are run by other organisations, and other organisation
367
+ websites will sometimes have links to our site. We have no control over these other websites and so are not
368
+ responsible for their contents.</p>
369
+
370
+ <hr>
371
+
372
+ <h5>4. Intellectual Property</h5>
373
+
374
+ <p>The contents of the Code for Life website are our ‘Intellectual Property’. This means that you cannot copy or
375
+ reuse them without our permission. Just because it is easy to copy some of the content on the website, this
376
+ does not mean it is allowed. The content covered by Intellectual Property includes:</p>
377
+ <ol type="a">
378
+ <li><p>Rapid Router, Python Den and Kurono applications</p></li>
379
+ <li><p>Games – this will include the design of the games (for example their graphics, style and gameplay)</p></li>
380
+ <li><p>Avatars, whether they are drawn or animated</p></li>
381
+ <li><p>Any other software or services you see on our website</p></li>
382
+ <li><p>Source Code (this is the code that our website and games are made up of)</p></li>
383
+ </ol>
384
+
385
+ <hr>
386
+
387
+ <h5>5. Our responsibilities</h5>
388
+
389
+ <p>We will not be responsible for:</p>
390
+ <ul>
391
+ <li><p>viruses, trojans and similar threats that could affect your access to, or use of, the website
392
+ (including your account),</p></li>
393
+ <li><p>any problems you have logging on because your computer, mobile device, broadband or software won’
394
+ work with our site,</p></li>
395
+ <li><p>any delays or failures that happen when you are using the site,</p></li>
396
+ <li><p>any errors loss of access to the site caused by a technical problem at Ocado,</p></li>
397
+ <li><p>the site not being suitable for your learning needs,</p></li>
398
+ <li><p>any inaccuracies in the description of our games or levels.</p></li>
399
+ </ul>
400
+ </div>
252
401
  </div>
253
402
 
254
403
  {% endblock content %}
@@ -1,63 +1,75 @@
1
1
  {# Overriden the original "two_factor" template to remove extending base template and slightly adjust style #}
2
2
 
3
- {% load i18n two_factor %}
4
-
5
- <section class="row mx-0">
6
- <span class="oval-blue login-shape-left"></span>
7
- <span class="polygon-yellow login-shape-right"></span>
8
- <div class="form--login is-flex form--register--teacher">
9
- <div class="form col-xs-12 col-sm-8 col-md-8 col-lg-9 center-block">
10
- <h4>{% block title %}{% trans "Login as a teacher " %}{% endblock %}</h4>
11
-
12
- {% if wizard.steps.current == 'auth' %}
13
- <p>{% blocktrans %}Enter your credentials.{% endblocktrans %}</p>
14
- {% elif wizard.steps.current == 'token' %}
15
- {% if device.method == 'call' %}
16
- <p>{% blocktrans trimmed %}We are calling your phone right now, please enter the
17
- digits you hear.{% endblocktrans %}</p>
18
- {% elif device.method == 'sms' %}
19
- <p>{% blocktrans trimmed %}We sent you a text message, please enter the tokens we
20
- sent.{% endblocktrans %}</p>
21
- {% else %}
22
- <p class="text-left">{% blocktrans trimmed %}Please enter the token generated by your token
23
- generator.{% endblocktrans %}</p>
24
- {% endif %}
25
- {% elif wizard.steps.current == 'backup' %}
26
- <p class="text-left">{% blocktrans trimmed %}Use this form for entering backup tokens for logging in.
27
- These tokens have been generated for you to print and keep safe. Please
28
- enter one of these backup tokens to login to your account.{% endblocktrans %}</p>
29
- {% endif %}
30
-
31
- <form action="" method="post" class="d-flex flex-column">{% csrf_token %}
32
- {% if wizard.steps.current == 'backup' %}
33
- {% include "two_factor/_wizard_forms_token.html" %}
34
- {% else %}
35
- {% include "two_factor/_wizard_forms.html" %}
36
- {% endif %}
37
-
38
- {# hidden submit button to enable [enter] key #}
39
- <input placeholder="" type="submit" value="" class="hidden" />
40
- {% if other_devices %}
41
- <p>{% trans "Or, alternatively, use one of your backup phones:" %}</p>
42
- <p>
43
- {% for other in other_devices %}
44
- <button name="challenge_device" value="{{ other.persistent_id }}"
45
- class="btn btn-secondary" type="submit">
46
- {{ other|device_action }}
47
- </button>
48
- {% endfor %}</p>
49
- {% endif %}
50
- {% if backup_tokens %}
51
- <p>
52
- <div class="d-flex flex-column justify-content-start align-items-start">
53
-
54
- <button name="wizard_goto_step" type="submit" value="backup"
55
- class="button button--primary">{% trans "Use a backup token" %}</button>
56
- </div>
57
- </p>
58
- {% endif %}
59
- {% include "two_factor/_wizard_actions_submit.html" %}
3
+ {% load i18n %}
4
+ {% load static %}
5
+ {% load two_factor_tags %}
6
+
7
+ {% block extra_media %}
8
+ {{ form.media }}
9
+ {% endblock %}
10
+
11
+ {% block content %}
12
+
13
+ <section class="row mx-0">
14
+ <span class="login-shape-left">
15
+ <img src="{% static 'portal/img/oval_blue.svg' %}" alt="Blue oval">
16
+ </span>
17
+ <span class="login-shape-right">
18
+ <img src="{% static 'portal/img/polygon_yellow.svg' %}" alt="Yellow polygon">
19
+ </span>
20
+ <div class="form--login is-flex form--register--teacher">
21
+ <div class="form col-xs-12 col-sm-8 col-md-8 col-lg-9 center-block">
22
+ <h4>{% block title %}{% trans "Welcome" %}{% endblock %}</h4>
23
+
24
+ {% if wizard.steps.current == 'auth' %}
25
+ <p>{% blocktrans %}Enter your credentials.{% endblocktrans %}</p>
26
+ {% elif wizard.steps.current == 'token' %}
27
+ <p>{{ device|as_verbose_action }}</p>
28
+ {% elif wizard.steps.current == 'backup' %}
29
+ <p>{% blocktrans trimmed %}Use this form for entering backup tokens for logging in.
30
+ These tokens have been generated for you to print and keep safe. Please
31
+ enter one of these backup tokens to log into your account.{% endblocktrans %}</p>
32
+ {% endif %}
33
+
34
+ <form action="" method="post">
35
+ {% block main_form_content %}
36
+ {% csrf_token %}
37
+ {% include "two_factor/_wizard_forms.html" %}
38
+
39
+ {# hidden submit button to enable [enter] key #}
40
+ <input type="submit" value="" hidden />
41
+
42
+ {% if other_devices %}
43
+ <p>{% trans "Or, alternatively, use one of your other authentication methods:" %}</p>
44
+ <p>
45
+ {% for other in other_devices %}
46
+ <button name="challenge_device" value="{{ other.persistent_id }}"
47
+ class="btn btn-secondary btn-block" type="submit">
48
+ {{ other|as_action }}
49
+ </button>
50
+ {% endfor %}</p>
51
+ {% endif %}
52
+
53
+ {% include "two_factor/_wizard_actions.html" %}
54
+ {% endblock %}
60
55
  </form>
61
- </div>
56
+
57
+ {% block 'backup_tokens' %}
58
+ {% if backup_tokens %}
59
+ <hr>
60
+ <div class="backup_tokens_form">
61
+ <form action="" method="post">
62
+ {% csrf_token %}
63
+ <p>{% trans "As a last resort, you can use a backup token:" %}</p>
64
+ <p>
65
+ <button name="wizard_goto_step" type="submit" value="backup"
66
+ class="button button--primary">{% trans "Use Backup Token" %}</button>
67
+ </p>
68
+ </form>
69
+ </div>
70
+ {% endif %}
71
+ {% endblock %}
62
72
  </div>
63
- </section>
73
+ </div>
74
+ </section>
75
+ {% endblock %}
@@ -3,55 +3,64 @@
3
3
  {% extends "two_factor/_base_focus.html" %}
4
4
  {% load i18n %}
5
5
 
6
+ {% block extra_media %}
7
+ {{ form.media }}
8
+ {% endblock %}
9
+
6
10
  {% block content %}
7
- <h4 class="text-center">{% block title %}{% trans "Two-factor authentication" %}{% endblock %}</h4>
8
- {% if wizard.steps.current == 'welcome' %}
9
- <p>{% blocktrans trimmed %}You are about to take your account security to the
10
- next level. Follow the steps in this wizard to enable two-factor
11
- authentication.{% endblocktrans %}</p>
12
- {% elif wizard.steps.current == 'method' %}
13
- <p>{% blocktrans trimmed %}Please select which authentication method you would
14
- like to use.{% endblocktrans %}</p>
15
- {% elif wizard.steps.current == 'generator' %}
16
- <p>{% blocktrans trimmed %}Two-factor authentication is not currently set up on your account.
17
- Enable two-factor authentication (2FA) for enhanced account security
18
- {% endblocktrans %}</p>
19
- <p>{% blocktrans trimmed %}To start using a token generator, please use your
20
- smartphone to scan the QR code below. For example, use Google
21
- Authenticator.
22
- {% endblocktrans %}</p>
23
- <p><img src="{% url 'two_factor:qr' %}" alt="QR Code" /></p>
24
- {% elif wizard.steps.current == 'sms' %}
25
- <p>{% blocktrans trimmed %}Please enter the phone number you wish to receive the
26
- text messages on. This number will be validated in the next step.
27
- {% endblocktrans %}</p>
28
- {% elif wizard.steps.current == 'call' %}
29
- <p>{% blocktrans trimmed %}Please enter the phone number you wish to be called on.
30
- This number will be validated in the next step. {% endblocktrans %}</p>
31
- {% elif wizard.steps.current == 'validation' %}
32
- {% if challenge_succeeded %}
33
- {% if device.method == 'call' %}
34
- <p>{% blocktrans trimmed %}We are calling your phone right now, please enter the
35
- digits you hear.{% endblocktrans %}</p>
36
- {% elif device.method == 'sms' %}
37
- <p>{% blocktrans trimmed %}We sent you a text message, please enter the tokens we
38
- sent.{% endblocktrans %}</p>
39
- {% endif %}
40
- {% else %}
41
- <p class="alert alert-warning" role="alert">{% blocktrans trimmed %}We've
42
- encountered an issue with the selected authentication method. Please
43
- go back and verify that you entered your information correctly, try
44
- again, or use a different authentication method instead. If the issue
45
- persists, contact the site administrator.{% endblocktrans %}</p>
46
- {% endif %}
47
- {% elif wizard.steps.current == 'yubikey' %}
48
- <p>{% blocktrans trimmed %}To identify and verify your YubiKey, please insert a
49
- token in the field below. Your YubiKey will be linked to your
50
- account.{% endblocktrans %}</p>
51
- {% endif %}
11
+ <h4>{% block title %}{% trans "Enable Two-Factor Authentication" %}{% endblock %}</h4>
12
+ {% if wizard.steps.current == 'welcome' %}
13
+ <p>{% blocktrans trimmed %}You are about to take your account security to the
14
+ next level. Follow the steps in this wizard to enable two-factor
15
+ authentication.{% endblocktrans %}</p>
16
+ {% elif wizard.steps.current == 'method' %}
17
+ <p>{% blocktrans trimmed %}Please select which authentication method you would
18
+ like to use.{% endblocktrans %}</p>
19
+ {% elif wizard.steps.current == 'generator' %}
20
+ <p>{% blocktrans trimmed %}To start using a token generator, please use your
21
+ smartphone to scan the QR code below. For example, use Google
22
+ Authenticator.{% endblocktrans %}</p>
23
+ <p><img src="{{ QR_URL }}" alt="QR Code" class="bg-white"/></p>
24
+ <p>{% blocktrans trimmed %}Alternatively you can use the following secret to
25
+ set up TOTP in your authenticator or password manager manually.{% endblocktrans %}</p>
26
+ <p>{% translate "TOTP Secret:" %} <a href="{{ otpauth_url }}">{{ secret_key }}</a></p>
27
+ <p>{% blocktrans %}Then, enter the token generated by the app.{% endblocktrans %}</p>
28
+
29
+ {% elif wizard.steps.current == 'sms' %}
30
+ <p>{% blocktrans trimmed %}Please enter the phone number you wish to receive the
31
+ text messages on. This number will be validated in the next step.
32
+ {% endblocktrans %}</p>
33
+ {% elif wizard.steps.current == 'call' %}
34
+ <p>{% blocktrans trimmed %}Please enter the phone number you wish to be called on.
35
+ This number will be validated in the next step. {% endblocktrans %}</p>
36
+ {% elif wizard.steps.current == 'validation' %}
37
+ {% if challenge_succeeded %}
38
+ {% if device.method == 'call' %}
39
+ <p>{% blocktrans trimmed %}We are calling your phone right now, please enter the
40
+ digits you hear.{% endblocktrans %}</p>
41
+ {% elif device.method == 'sms' %}
42
+ <p>{% blocktrans trimmed %}We sent you a text message, please enter the tokens we
43
+ sent.{% endblocktrans %}</p>
44
+ {% endif %}
45
+ {% else %}
46
+ <p class="alert alert-warning" role="alert">{% blocktrans trimmed %}We've
47
+ encountered an issue with the selected authentication method. Please
48
+ go back and verify that you entered your information correctly, try
49
+ again, or use a different authentication method instead. If the issue
50
+ persists, contact the site administrator.{% endblocktrans %}</p>
51
+ {% endif %}
52
+ {% elif wizard.steps.current == 'yubikey' %}
53
+ <p>{% blocktrans trimmed %}To identify and verify your YubiKey, please insert a
54
+ token in the field below. Your YubiKey will be linked to your
55
+ account.{% endblocktrans %}</p>
56
+ {% endif %}
57
+
58
+ <form action="" method="post">{% csrf_token %}
59
+ {% include "two_factor/_wizard_forms.html" %}
60
+
61
+ {# hidden submit button to enable [enter] key #}
62
+ <input type="submit" value="" hidden />
52
63
 
53
- <form action="" method="post">{% csrf_token %}
54
- {% include "two_factor/setup_wizard_token.html" %}
55
- {% include "two_factor/_wizard_actions_enable_2fa.html" %}
56
- </form>
64
+ {% include "two_factor/_wizard_actions.html" %}
65
+ </form>
57
66
  {% endblock %}
@@ -1,7 +1,7 @@
1
1
  {# Overriding the original "two_factor" template #}
2
2
  {% extends "two_factor/_base_focus.html" %}
3
3
  {% load i18n %}
4
- {% load staticfiles %}
4
+ {% load static %}
5
5
  {% load app_tags %}
6
6
 
7
7
  {% block scripts %}