Repository navigation
Expand file tree
/
Copy pathlogin.pug
More file actions
173 lines (160 loc) · 9.33 KB
/
Copy pathlogin.pug
File metadata and controls
173 lines (160 loc) · 9.33 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
extends layout
block content
- const pvnFlows = ['pvn_ip', 'pvn_ip_plus', 'pvn_im', 'pvn_ipificator', 'pvn_sim', 'pvn_sms'];
- const loginFlows = ['login_ip', 'login_ip_plus', 'login_im', 'login_sim'];
- const identityFlows = ['anonymous', 'kyc_phone'];
- const hasPvnButtons = pvnFlows.some(flow => clients.find(c => c.user_flow === flow));
- const hasLoginButtons = loginFlows.some(flow => clients.find(c => c.user_flow === flow));
- const hasIdentityButtons = identityFlows.some(flow => clients.find(c => c.user_flow === flow));
- const firstVisibleTab = hasPvnButtons ? 'pnv' : (hasLoginButtons ? 'login' : (hasIdentityButtons ? 'identity' : 'pnv'));
.container.d-flex.h-100.w-100.mx-auto.flex-column
main
#login.center-vertical
div.form-login
.clearfix
.row.block-header
.col.col-sm-6.col-md-8
.row
if app_logo_url
img.app-logo(src=app_logo_url alt=locale.app.name style=app_logo_style || 'max-width: 100%')
else
h3.app-name #{locale.app.name}
.col.col-sm-6.col-md-4
if auth_servers.length > 1
.row.auth-server-selector
.label Site
select.form-control(id="select_auth_server")
each auth_server in auth_servers
option(value=auth_server.id) #{auth_server.id}
.row.block-page
ul.list-tabs.nav.nav-tabs
if hasPvnButtons
li.nav-item
a.nav-link.nav-link-pnv(href="#pnv" onClick="select_nav('pnv')" class=firstVisibleTab === 'pnv' ? 'active' : '') #{locale.tabs.pnv}
if hasLoginButtons
li.nav-item
a.nav-link.nav-link-login(href="#login" onClick="select_nav('login')" class=firstVisibleTab === 'login' ? 'active' : '') #{locale.tabs.login}
if hasIdentityButtons
li.nav-item
a.nav-link.nav-link-identity(href="#identity" onClick="select_nav('identity')" class=firstVisibleTab === 'identity' ? 'active' : '') #{locale.tabs.identity}
.col-12.row-item
if hasPvnButtons
.block-button.block.block-pnv.block-1#pnv(class=firstVisibleTab === 'pnv' ? 'active' : '')
p.description_title #{locale.sections.pnv.title}
p.description !{locale.sections.pnv.description}
.div(style="margin-top: 15px")
.row
.col
input.form-control.phoneNumber(type='text' name='phone' id='phone')
each flow in pvnFlows
- const client = clients.find(c => c.user_flow === flow);
if client
if flow === 'pvn_ip'
button.btn_full.btn.btn_phone.btn-active.btnLoginPhone.btn-user-flow#pvn_ip(data-title=get_flow_title('pvn_ip', locale.sections.pnv.title) data-user-flow='pvn_ip' data-client-id=client.client_id) #{locale.sections.pnv.button_ip_label || locale.buttons.ip}
span.right-icon
else if flow === 'pvn_ip_plus'
button.btn_full.btn.btn_phone.btn-active.btnLoginPhone.btn-user-flow#pvn_ip_plus(data-title=get_flow_title('pvn_ip_plus', locale.sections.pnv.title) data-user-flow='pvn_ip_plus' data-client-id=client.client_id) #{locale.sections.pnv.button_ip_plus_label || locale.buttons.ip_plus}
span.right-icon
else if flow === 'pvn_im'
button.btn_full.btn.btn_IM.btnLoginPhone.btn-user-flow#pvn_im(data-title=get_flow_title('pvn_im', locale.sections.pnv.title) data-user-flow='pvn_im' data-client-id=client.client_id) #{locale.sections.pnv.button_im_label || locale.buttons.im}
span.right-icon
else if flow === 'pvn_ipificator'
button.btn_full.btn.btn_IM.btnLoginPhone.btn-user-flow#pvn_ipificator(data-title=get_flow_title('pvn_ipificator', locale.sections.pnv.title) data-user-flow='pvn_ipificator' data-client-id=client.client_id, style="display: none") #{locale.sections.pnv.button_ip_via_app_label || locale.buttons.ip_via_app}
span.right-icon
else if flow === 'pvn_sim'
button.btn_full.btn.btn_IM.btnLoginPhone.btn-user-flow#pvn_sim(data-title=get_flow_title('pvn_sim', locale.sections.pnv.title) data-user-flow='pvn_sim' data-client-id=client.client_id) #{locale.sections.pnv.button_sim_label || locale.buttons.sim}
span.right-icon
else if flow === 'pvn_sms'
button.btn_full.btn.btn_sms.btnLoginPhone.btn-user-flow#pvn_sms(data-title=get_flow_title('pvn_sms', locale.sections.pnv.title) data-user-flow='pvn_sms' data-client-id=client.client_id) #{locale.sections.pnv.button_sms_label || locale.buttons.sms}
span.right-icon
if hasLoginButtons
.block-button.block-login.block.block-2#login(class=firstVisibleTab === 'login' ? 'active' : '')
p.description_title #{locale.sections.login.title}
p.description.description_helper !{locale.sections.login.description}
each flow in loginFlows
- const client = clients.find(c => c.user_flow === flow);
if client
if flow === 'login_ip'
button.btn_full_blue.btn_instant.btn-user-flow#login_ip(type='button' data-title=get_flow_title('login_ip', locale.sections.login.title) data-user-flow='login_ip' data-client-id=client.client_id)
span.right-icon
span #{locale.sections.login.button_ip_label || locale.buttons.ip}
else if flow === 'login_ip_plus'
button.btn_full_blue.btn_instant.btn-user-flow#login_ip_plus(type='button' data-title=get_flow_title('login_ip_plus', locale.sections.login.title) data-user-flow='login_ip_plus' data-client-id=client.client_id)
span.right-icon
span #{locale.sections.login.button_ip_plus_label || locale.buttons.ip_plus}
else if flow === 'login_im'
button.btn_full_blue.btn-user-flow#login_im(type='button' data-title=get_flow_title('login_im', locale.sections.login.title) data-user-flow='login_im' data-client-id=client.client_id)
span.right-icon
span #{locale.sections.login.button_im_label || locale.buttons.im}
else if flow === 'login_sim'
button.btn_full_blue.btn-user-flow#login_sim(type='button' data-title=get_flow_title('login_sim', locale.buttons.sim) data-user-flow='login_sim' data-client-id=client.client_id)
span.right-icon
span #{locale.sections.login.button_sim_label || locale.buttons.sim}
if hasIdentityButtons
.block-button.block.block-identity.block-1#identity(class=firstVisibleTab === 'identity' ? 'active' : '')
p.description_title #{locale.sections.identity.title}
p.description.description_helper !{locale.sections.identity.description}
- const anonymousClient = clients.find(c => c.user_flow === 'anonymous');
if anonymousClient
button.btn_full_blue.btn_instant.btn-user-flow#anonymous(type='button' data-title=get_flow_title('anonymous', locale.sections.identity.title) style="margin-bottom:59px" data-user-flow='anonymous' data-client-id=anonymousClient.client_id)
span.right-icon.right-icon-blue
span #{locale.sections.identity.button_anonymous_identity_label || locale.buttons.anonymous_identity}
- const kycClient = clients.find(c => c.user_flow === 'kyc_phone');
if kycClient
.div
input.form-control.phoneNumber(type='text' name='phone_kyc' id='phone_kyc')
button.btn_full.btn.btn_kyc.btnLoginPhone.btn-user-flow#kyc_phone(data-title=get_flow_title('kyc_phone', locale.sections.identity.title) type='button' data-user-flow='kyc_phone' data-client-id=kycClient.client_id) #{locale.sections.identity.button_kyc_label || locale.buttons.kyc}
span.right-icon
footer(class="mt-auto")
.viettel-legal
| #{locale.footer.viettel_legal}
a(href="#" style="margin-left: 4px; margin-right: 4px;" onclick="showConsentPage()") <b>#{locale.footer.viettel}</b>
| in case you are Viettel subscribers.
.privacy-link
a(href="https://www.ipification.com/legal" target='_blank')
| #{locale.footer.privacy_policy}
span.info-icon
| #{locale.footer.about}
a(href="javascript:void(0)" id="help")
| #{locale.footer.help}
#app_info.modal(tabindex="-1" role="dialog")
.modal-dialog
.modal-content(style="border-radius: 0px;")
.modal-header
h5.modal-title #{locale.modals.about_title}
button.close(type='button' data-dismiss='modal' aria-label='Close')
span(aria-hidden='true').right-icon
.modal-body
div.mb-3
strong #{locale.modals.server_label}
p#selected_server_info -
.developer-link
a(href="https://developer.ipification.com/#/")
| #{locale.modals.developer_link}
#input_alert.error-popup.modal(tabindex="-1" role="dialog")
.modal-dialog
.modal-content(style="border-radius: 0px;")
.modal-header
h6.modal-title #{locale.modals.phone_required}
#phone_invalid_alert.error-popup.modal(tabindex="-1" role="dialog")
.modal-dialog
.modal-content(style="border-radius: 0px;")
.modal-header
h6.modal-title #{locale.modals.phone_invalid}
.wrapper-loader
span.loader
span.loader-inner
if error_message
#error_alert.modal(tabindex="-1" role="dialog")
.modal-dialog
.modal-content(style="border-radius: 0px;")
.modal-header
h6.modal-title
| #{error_message}
if error_state
br
strong
| State: #{error_state}
block head_scripts
script(type="text/javascript").
var base_url = "!{baseUrl}";