Sprankelprachtig aan/afmeldsysteem

settings.html.haml 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. %h1
  2. = t 'settings.settings'
  3. %h2
  4. = t 'settings.calendar'
  5. .row
  6. .col-md-12
  7. %em
  8. = t 'settings.descriptions.calendar'
  9. .form-group
  10. .input-group
  11. = text_field_tag(:calurl, person_calendar_url(@person.calendar_token), readonly: true, id: 'calurl', class: 'form-control')
  12. %span.input-group-btn
  13. = button_tag(class: 'btn btn-default copy-url', data: {'clipboard-target': '#calurl'}) do
  14. %i.far.fa-files
  15. .form-group
  16. .input-group
  17. = text_field_tag(:calurl_nocancel, person_calendar_url(@person.calendar_token, skipcancel: 1), readonly: true, id: 'calurl-skipcancel', class: 'form-control')
  18. %span.input-group-btn
  19. = button_tag(class: 'btn btn-default copy-url', data: {'clipboard-target': '#calurl-skipcancel'}) do
  20. %i.far.fa-files
  21. %h2
  22. = t 'settings.email_settings'
  23. = form_tag(update_email_settings_path, method: "post", class: "form") do
  24. .row
  25. .col-md-4
  26. %label
  27. = check_box_tag(:send_attendance_reminder, 'send_attendance_reminder', @send_attendance_reminder)
  28. = t('settings.names.send_attendance_reminder')
  29. .col-md-8
  30. %p
  31. %em= t 'settings.descriptions.send_attendance_reminder'
  32. = submit_tag t('helpers.submit.submit', model: t('settings.settings')), class: 'btn btn-primary'
  33. %h2
  34. = t 'settings.logout_all_sessions'
  35. %p
  36. %em= t 'settings.descriptions.logout_all_sessions'
  37. %p
  38. = t 'settings.descriptions.logged_in_at_count', count: @active_sessions
  39. = form_tag(logout_all_path, method: 'post', class: 'form') do
  40. = submit_tag t('settings.logout_all_sessions'), class: 'btn btn-danger', data: {confirm: t(:areyousure)}
  41. %h2
  42. = t 'settings.change_password'
  43. = form_tag(update_password_path, method: 'post', class: 'form') do
  44. .form-group
  45. = label_tag(:current_password, t('authentication.current_password'))
  46. = password_field_tag(:current_password, '', class: 'form-control')
  47. .form-group
  48. = label_tag(:new_password, t('authentication.new_password'))
  49. = password_field_tag(:new_password, '', class: 'form-control')
  50. .form-group
  51. = label_tag(:new_password_confirm, t('authentication.new_password_confirm'))
  52. = password_field_tag(:new_password_confirm, '', class: 'form-control')
  53. = submit_tag t('settings.change_password'), class: 'btn btn-primary'