/
index.html.slim
89 lines (85 loc) · 3.56 KB
/
index.html.slim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
- title t('titles.profile')
- btn_cls = 'btn btn-primary p0 w-60p bg-light-blue blue h6 regular border-box center'
- if @recovery_code
.mb4.alert.alert-warning
p = t('idv.messages.recovery_code')
.mb1.py1.px2.inline-block.fs-20p.regular.monospace.bg-white.rounded = @recovery_code
- if @decrypted_pii
h2.h3.my0.mr1.inline-block = t('headings.profile.profile_info')
= content_tag(:span, t('headings.profile.profile_info_tt'),
class: 'h5 blue sans-serif underline hint--top hint--no-animate',
tabindex: 0,
'aria-label': t('tooltips.profile_idv'))
.mt2.mb4
.py-12p.border-top
.clearfix.mxn1
.sm-col.sm-col-5.px1 = t('.full_name')
.sm-col.sm-col-7.px1.truncate #{@decrypted_pii.first_name} #{@decrypted_pii.last_name}
.py-12p.border-top
.clearfix.mxn1
.sm-col.sm-col-5.px1 = t('.address')
.sm-col.sm-col-7.px1
| #{@decrypted_pii.address1}<br>
- if @decrypted_pii.address2.present?
| #{@decrypted_pii.address2}<br>
| #{@decrypted_pii.city}, #{@decrypted_pii.state} #{@decrypted_pii.zipcode}
.py-12p.border-top
.clearfix.mxn1
.sm-col.sm-col-5.px1 = t('.dob')
.sm-col.sm-col-7.px1 #{@decrypted_pii.dob.to_date.to_formatted_s(:long)}
.py-12p.border-top
.clearfix.mxn1
.sm-col.sm-col-5.px1 = t('.ssn')
.sm-col.sm-col-7.px1 = "***-**-#{@decrypted_pii.ssn[-4..-1]}"
.py-12p.border-top.border-bottom
.clearfix.mxn1
.sm-col.sm-col-5.px1 = t('.phone')
.sm-col.sm-col-7.px1 = @decrypted_pii.phone
h2.h3.my0 = t('headings.profile.login_info')
.mt2.mb4
.py-12p.border-top
.clearfix.mxn1
.sm-col.sm-col-5.px1 = t('.email')
.sm-col.sm-col-5.px1.truncate = current_user.email
.sm-col.sm-col-2.px1.sm-right-align
= link_to t('forms.buttons.edit'), edit_email_path, class: btn_cls
.py-12p.border-top.border-bottom
.clearfix.mxn1
.sm-col.sm-col-10.px1 = t('.password')
.sm-col.sm-col-2.px1.sm-right-align
= link_to t('forms.buttons.edit'), settings_password_path, class: btn_cls
.mt3.mb1.h6.bold.caps.ls-0
| #{t('headings.profile.two_factor')}#{tooltip(t('tooltips.two_factor'))}
.py-12p.border-top
.clearfix.mxn1
.sm-col.sm-col-5.px1 = t('.phone')
.sm-col.sm-col-5.px1 = current_user.phone
.sm-col.sm-col-2.px1.sm-right-align
= link_to t('forms.buttons.edit'), edit_phone_path, class: btn_cls
.py-12p.border-top
.clearfix.mxn1
.sm-col.sm-col-10.px1 = t('.authentication_app')
.sm-col.sm-col-2.px1.sm-right-align
- if current_user.totp_enabled?
= button_to t('forms.buttons.disable'), disable_totp_url, \
method: :delete, class: btn_cls
- else
= link_to t('forms.buttons.enable'), authenticator_start_url, \
class: btn_cls
.py-12p.border-top.border-bottom
.clearfix.mxn1
.sm-col.sm-col-10.px1 = t('profile.items.recovery_code')
.sm-col.sm-col-2.px1.sm-right-align
= link_to t('profile.links.regenerate_recovery_code'), \
settings_recovery_code_url, class: btn_cls
h2.h3.my0 = t('headings.profile.account_history')
.mt2.mb2
- decorated_user = current_user.decorate
- events_len = decorated_user.recent_events.length
- decorated_user.recent_events.each_with_index do |event, i|
div class="py-12p border-top #{'border-bottom' if i + 1 == events_len}"
.clearfix.mxn1
.sm-col.sm-col-6.px1
.truncate = event.pretty_event_type
.sm-col.sm-col-6.px1.sm-right-align
= event.happened_at.to_date.to_formatted_s(:long)