2020-05-13 21:47:51 +00:00
@ extends ( 'adminlte::page' )
2020-09-01 16:46:27 +00:00
@ section ( 'title' , config ( 'app.name' ) . ' | ' . __ ( 'messages.profile.account_settings' ))
2020-05-13 21:47:51 +00:00
@ section ( 'content_header' )
2020-09-01 16:46:27 +00:00
< h4 > {{ __ ( 'messages.reusable.profile' )}} / {{ __ ( 'messages.reusable.acc' )}} / {{ __ ( 'messages.reusable.settings' )}} </ h4 >
2020-05-13 21:47:51 +00:00
@ stop
@ section ( 'js' )
< x - global - errors ></ x - global - errors >
@ stop
@ section ( 'css' )
< link rel = " stylesheet " href = " /css/acc.css " >
@ stop
@ section ( 'content' )
2020-07-17 21:44:10 +00:00
2020-10-08 18:19:10 +00:00
< x - modal id = " deleteAccountModal " modal - label = " deleteAccountModalLabel " modal - title = " Close account " include - close - button = " true " >
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fas fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2020-10-08 18:19:10 +00:00
< p > Deleting your account is an irreversible process . The following data will be deleted ( including personally identifiable data ) :</ p >
< ul >
< li > Last IP address </ li >
< li > Name , Email and MC Username </ li >
< li > Your previous applications </ li >
< li > Your profile data and preferences </ li >
< li > If you were a staff member :</ li >
< ul >
< li > Your comments </ li >
< li > Any votes </ li >
< li > Your roles </ li >
</ ul >
</ ul >
< p > What is not deleted :</ p >
< ul >
< li > Server logs of your visits , including IP addresses </ li >
</ ul >
< form id = " deleteAccountForm " method = " POST " action = " { { route('userDelete') }} " >
@ csrf
@ method ( 'PATCH' )
< div class = " form-group " >
< label for = " currentPassword " > Re - enter your password </ label >
< input class = " form-control " autocomplete = " current-password " type = " password " name = " currentPassword " id = " currentPassword " required >
< p class = " text-muted text-sm " >< i class = " fas fa-info-circle " ></ i > For your security , your password is always required for sensitive operations . < a href = " { { route('password.request') }} " > Forgot your password ? </ a ></ p >
</ div >
@ if ( Auth :: user () -> has2FA ())
< div class = " form-group mt-5 " >
< label for = " otp " > Two - factor authentication code </ label >
< input type = " text " id = " otp " name = " otp " class = " form-control " >
< p class = " text-muted text-sm " >< i class = " fas fa-info-circle " ></ i > You cannot recover lost 2 FA secrets .</ p >
</ div >
@ endif
</ form >
< x - slot name = " modalFooter " >
2021-09-03 23:44:54 +00:00
< button {{ ( $demoActive ) ? 'disabled' : '' }} onclick = " $ ('#deleteAccountForm').submit() " type = " button " class = " btn btn-warning " >< i class = " fas fa-exclamation-triangle " ></ i > Continue </ button >
2020-10-08 18:19:10 +00:00
</ x - slot >
</ x - modal >
2020-07-17 21:44:10 +00:00
@ if ( ! Auth :: user () -> has2FA ())
2021-09-03 23:44:54 +00:00
2020-07-17 21:44:10 +00:00
2020-09-03 01:08:14 +00:00
< x - modal id = " twoFactorAuthModal " modal - label = " 2faLabel " modal - title = " { { __('messages.2fa_txt')}} " include - close - button = " true " >
2020-07-17 21:44:10 +00:00
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fa fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2020-09-01 16:46:27 +00:00
< h3 >< i class = " fas fa-user-shield " ></ i > {{ __ ( 'messages.profile.2fa_welcome' )}} </ h3 >
2020-07-17 21:44:10 +00:00
2020-09-01 16:46:27 +00:00
< p >< b > {{ __ ( 'messages.profile.supported_apps' )}} </ b ></ p >
2020-07-17 21:44:10 +00:00
< ul >
< li >< a href = " https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en " >< i class = " fab fa-google-play " ></ i > Google Authenticator </ a ></ li >
</ ul >
2020-09-01 16:46:27 +00:00
< p > {{ __ ( 'messages.profile.scan_code' , [ 'scannable' , 'QR' ])}} </ p >
2020-07-17 21:44:10 +00:00
< div class = " row " >
< div class = " col-3 offset-3 " >
< div class = " qr-code-container text-center " >
< img src = " { { $twofaQRCode }} " alt = " 2FA Security key " />
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col " >
< form method = " POST " action = " { { route('enable2FA') }} " id = " enable2Fa " >
@ csrf
@ method ( 'PATCH' )
2020-09-01 16:46:27 +00:00
< label for = " otp " > {{ __ ( 'messages.profile.otp' )}} </ label >
2020-07-17 21:44:10 +00:00
< input type = " text " id = " otp " name = " otp " class = " form-control " />
</ form >
</ div >
</ div >
< x - slot name = " modalFooter " >
2021-09-03 23:44:54 +00:00
< button {{ ( $demoActive ) ? 'disabled' : '' }} type = " button " class = " btn btn-success " onclick = " $ ('#enable2Fa').submit() " >< i class = " fas fa-key " ></ i > {{ __ ( 'messages.profile.2fa_enable' )}} </ button >
2020-07-17 21:44:10 +00:00
</ x - slot >
</ x - modal >
@ endif
@ if ( Auth :: user () -> has2FA ())
2020-09-03 01:08:14 +00:00
< x - modal id = " remove2FA " modal - label = " remove2FALabel " modal - title = " { { __('messages.profile.2fa_remove_extended')}} " include - close - button = " true " >
2020-07-17 21:44:10 +00:00
2020-09-01 16:46:27 +00:00
< p >< i class = " fas fa-exclamation-triangle " ></ i > < b > {{ __ ( 'messages.application_m.modal_confirm' )}} </ b > {{ __ ( 'messages.profile.2fa_remove_consequence' )}} </ p >
2020-07-17 21:44:10 +00:00
< form action = " { { route('disable2FA') }} " method = " POST " id = " disable2FA " >
@ csrf
@ method ( 'PATCH' )
2020-09-01 16:46:27 +00:00
< label for = " currentPassword " > {{ __ ( 'messages.profile.2fa_password_confirm' )}} </ label >
2020-07-17 21:44:10 +00:00
< input id = " currentPassword " type = " password " name = " currentPassword " class = " form-control " required />
2020-09-01 16:46:27 +00:00
< p class = " text-sm text-muted " > {{ __ ( 'messages.profile.2fa_password_confirm_exp' )}} </ p >
2020-07-17 21:44:10 +00:00
< div class = " form-group mt-2 " >
2020-09-01 16:46:27 +00:00
< label for = " consent " > {{ __ ( 'messages.profile.2fa_disable_consent' )}} </ label >
< span >< i > {{ __ ( 'messages.reusable.confirm_click' )}} </ i > </ span >< input type = " checkbox " name = " consent " id = " consent " required />
2020-07-17 21:44:10 +00:00
</ div >
</ form >
< x - slot name = " modalFooter " >
2020-09-01 16:46:27 +00:00
< button type = " button " class = " btn btn-danger " onclick = " $ ('#disable2FA').submit() " >< i class = " fa fa-trash " ></ i > {{ __ ( 'messages.profile.2fa_remove' )}} </ button >
2020-07-17 21:44:10 +00:00
</ x - slot >
</ x - modal >
@ endif
2020-05-13 21:47:51 +00:00
< div class = " modal fade " tabindex = " -1 " id = " authenticationForm " role = " dialog " aria - labelledby = " authenticationFormLabel " aria - hidden = " true " >
< div class = " modal-dialog " role = " document " >
< div class = " modal-content " >
< div class = " modal-header " >
2020-09-01 16:46:27 +00:00
< h5 class = " modal-title " id = " authenticationFormLabel " > {{ __ ( 'messages.reusable.auth_req' )}} </ h5 >
2020-05-13 21:47:51 +00:00
< button type = " button " class = " close " data - dismiss = " modal " aria - label = " Close " >
< span aria - hidden = " true " >& times ; </ span >
</ button >
</ div >
< div class = " modal-body " >
2020-09-01 16:46:27 +00:00
< p class = " text-muted " > {{ __ ( 'messages.profile.security_lgotherdev' )}} </ p >
2020-05-13 21:47:51 +00:00
< form method = " POST " action = " { { route('flushSessions')}} " id = " flushSessions " >
@ csrf
2020-09-01 16:46:27 +00:00
< label for = " reenter " > {{ __ ( 'messages.profile.password_reenter' )}} </ label >
2020-05-13 21:47:51 +00:00
< input type = " password " name = " currentPasswordFlush " id = " currentPasswordFlush " class = " form-control " autocomplete = " current-password " >
</ form >
</ div >
< div class = " modal-footer " >
2020-09-01 16:46:27 +00:00
< button type = " button " class = " btn btn-success " onclick = " document.getElementById('flushSessions').submit() " > {{ __ ( 'messages.reusable.confirm' )}} </ button >
< button type = " button " class = " btn btn-secondary " data - dismiss = " modal " > {{ __ ( 'messages.modal_close' )}} </ button >
2020-05-13 21:47:51 +00:00
</ div >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col text-center " >
< div class = " card " >
< div class = " card-body " >
2020-09-01 16:46:27 +00:00
< h3 > {{ __ ( 'messages.welcome_back' )}} {{ Auth :: user () -> name }} </ h3 >
2020-05-13 21:47:51 +00:00
< p class = " text-muted " > {{ Auth :: user () -> email }} </ p >
2020-09-01 16:46:27 +00:00
< a href = " https://namemc.com/profile/ { { Auth::user()->uuid}} " target = " _blank " > {{ __ ( 'messages.reusable.view' )}} @ NameMC </ a >
2020-05-13 21:47:51 +00:00
</ div >
</ div >
</ div >
</ div >
2021-01-06 05:03:38 +00:00
@ if ( session ( 'passwordExpired' ))
< div class = " row " >
< div class = " col " >
< div class = " alert alert-warning " >
< p >< i class = " fas fa-exclamation-triangle " ></ i >< b > Your password has expired </ b ></ p >
< p >
You 've been redirected here because your <b>password has expired.</b> All users must change their password every {{ \App\Facades\Options::getOption(' password_expiry ' ) }} days .
This is put in place to make sure user accounts remain secure .
</ p >
< p > Please change update your password now . You won ' t be able to use the application until you do this .</ p >
</ div >
</ div >
</ div >
@ endif
2020-05-13 21:47:51 +00:00
< div class = " row " >
< div class = " col " >
< div class = " card mt-3 tab-card " >
< div class = " card-header tab-card-header " >
< ul class = " nav nav-tabs card-header-tabs " id = " myTab " role = " tablist " >
< li class = " nav-item " >
2020-09-01 16:46:27 +00:00
< a class = " nav-link " id = " accountSecurityTab " data - toggle = " tab " href = " #accountSecurity " role = " tab " aria - controls = " AccountSecurity " aria - selected = " true " > {{ __ ( 'messages.profile.acc_security' )}} </ a >
2020-05-13 21:47:51 +00:00
</ li >
< li class = " nav-item " >
2020-09-01 16:46:27 +00:00
< a class = " nav-link " id = " twofaTab " data - toggle = " tab " href = " #twofa " role = " tab " aria - controls = " TwoFa " aria - selected = " false " > {{ __ ( 'messages.profile.2fa' )}} </ a >
2020-05-13 21:47:51 +00:00
</ li >
< li class = " nav-item " >
2020-09-01 16:46:27 +00:00
< a class = " nav-link " id = " sessionsTab " data - toggle = " tab " href = " #sessions " role = " tab " aria - controls = " Sessions " aria - selected = " false " > {{ __ ( 'messages.profile.sessions' )}} </ a >
2020-05-13 21:47:51 +00:00
</ li >
< li class = " nav-item " >
2020-09-01 16:46:27 +00:00
< a class = " nav-link " id = " contactSettingsTab " data - toggle = " tab " href = " #contactSettings " role = " tab " aria - controls = " ContactSettings " aria - selected = " false " > {{ __ ( 'messages.profile.contact_settings' )}} </ a >
2020-05-13 21:47:51 +00:00
</ li >
2020-10-08 18:19:10 +00:00
< li class = " nav-item " >
< a class = " nav-link " id = " dangerZoneTab " data - toggle = " tab " href = " #dangerZone " role = " tab " aria - controls = " DangerZone " aria - selected = " false " > Danger Zone </ a >
</ li >
2020-05-13 21:47:51 +00:00
</ ul >
</ div >
< div class = " tab-content " id = " myTabContent " >
< div class = " tab-pane fade show active p-3 " id = " accountSecurity " role = " tabpanel " aria - labelledby = " accountSecurityTab " >
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fa fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2020-09-01 16:46:27 +00:00
< h5 class = " card-title " > {{ __ ( 'messages.profile.change_password' )}} </ h5 >
< p class = " card-text " > {{ __ ( 'messages.profile.change_password_exp' )}} </ p >
2020-05-13 21:47:51 +00:00
< form method = " POST " action = " { { route('changePassword')}} " id = " changePassword " >
@ csrf
@ method ( 'PATCH' )
2020-09-01 16:46:27 +00:00
< label for = " oldpassword " > {{ __ ( 'messages.profile.old_pass' )}} </ label >
2020-05-13 21:47:51 +00:00
< input class = " form-control " name = " oldPassword " type = " password " id = " oldpassword " autocomplete = " current-password " >
2020-09-01 16:46:27 +00:00
< p class = " text-sm text-muted " > {{ __ ( 'messages.forgot_pw' , [ 'link' => '<a href="/auth/password/reset">' . __ ( 'messages.reusable.here' ) . '</a>' ])}} </ p >
2020-05-13 21:47:51 +00:00
< div class = " form-group mt-5 " >
2020-09-01 16:46:27 +00:00
< label for = " newpassword " > {{ __ ( 'messages.profile.new_pw' )}} </ label >
2020-05-13 21:47:51 +00:00
< input type = " password " name = " newPassword " id = " newpassword " class = " form-control " autocomplete = " new-password " >
2020-09-01 16:46:27 +00:00
< label for = " newpassword_confirmation " > {{ __ ( 'messages.sronly_confirmpassword' )}} </ label >
2020-05-13 21:47:51 +00:00
< input type = " password " name = " newPassword_confirmation " id = " newpassword_confirmation " autocomplete = " new-password " class = " form-control " >
</ div >
</ form >
2021-09-03 23:44:54 +00:00
< button {{ ( $demoActive ) ? 'disabled' : '' }} class = " btn btn-success " type = " button " onclick = " document.getElementById('changePassword').submit() " > {{ __ ( 'messages.profile.change_password' )}} </ button >
2020-05-13 21:47:51 +00:00
</ div >
< div class = " tab-pane fade p-3 " id = " twofa " role = " tabpanel " aria - labelledby = " twofaTab " >
2020-09-01 16:46:27 +00:00
< h5 class = " card-title " > {{ __ ( 'messages.profile.2fa' )}} </ h5 >
2020-07-17 21:44:10 +00:00
< br />
@ if ( Auth :: user () -> has2FA ())
2020-09-01 16:46:27 +00:00
< p > {{ __ ( 'messages.profile.2fa_enable_success' )}} </ p >
< button type = " button " class = " btn btn-danger " onclick = " $ ('#remove2FA').modal('show') " >< i class = " fa fa-ban " ></ i > {{ __ ( 'messages.profile.2fa_remove' )}} </ button >
2020-07-17 21:44:10 +00:00
@ else
2020-09-01 16:46:27 +00:00
< p class = " card-text " >< b > {{ __ ( 'messages.profile.2fa_avail' )}} </ b > {{ __ ( 'messages.profile.2fa_avail_exp' )}} </ p >
< button type = " button " class = " btn btn-primary " onclick = " $ ('#twoFactorAuthModal').modal('show') " > {{ __ ( 'messages.profile.2fa_enable' )}} </ button >
2020-07-17 21:44:10 +00:00
@ endif
2020-05-13 21:47:51 +00:00
</ div >
< div class = " tab-pane fade p-3 " id = " sessions " role = " tabpanel " aria - labelledby = " sessionsTab " >
2020-09-01 16:46:27 +00:00
< h5 class = " card-title " > {{ __ ( 'messages.profile.session_manager' )}} </ h5 >
< p class = " card-text " > {{ __ ( 'messages.profile.terminate_others' )}} </ p >
2021-09-03 23:44:54 +00:00
< p > {{ __ ( 'messages.profile.current_session' , [ 'ipAddress' => ( $demoActive ) ? '0.0.0.0 (censored)' : $ip ])}} </ p >
2020-09-01 16:46:27 +00:00
< button type = " button " class = " btn btn-warning " onclick = " $ ('#authenticationForm').modal('show') " > {{ __ ( 'messages.profile.flush_session' )}} </ button >
2020-05-13 21:47:51 +00:00
</ div >
< div class = " tab-pane fade p-3 " id = " contactSettings " role = " tabpanel " aria - labelledby = " contactSettingsTab " >
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fa fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2020-09-01 16:46:27 +00:00
< h5 class = " card-title " > {{ __ ( 'messages.profile.contact_settings' )}} </ h5 >
< p class = " card-text " > {{ __ ( 'messages.profile.personal_data_change' )}} </ p >
2020-05-13 21:47:51 +00:00
< form method = " POST " action = " { { route('changeEmail')}} " id = " changeEmail " >
@ csrf
@ method ( 'PATCH' )
< div class = " form-group " >
2020-09-01 16:46:27 +00:00
< label for = " oldEmail " > {{ __ ( 'messages.profile.current_email' )}} </ label >
2020-05-13 21:47:51 +00:00
< input type = " text " class = " form-control " id = " oldEmail " disabled value = " { { Auth::user()->email}} " >
2020-09-01 16:46:27 +00:00
< label for = " newEmail " > {{ __ ( 'messages.profile.new_email' )}} </ label >
2020-05-13 21:47:51 +00:00
< input type = " email " name = " newEmail " class = " form-control mb-3 " id = " newEmail " >
</ div >
< div class = " form-group mt-5 " >
2020-09-01 16:46:27 +00:00
< label for = " currentPassword " > {{ __ ( 'messages.profile.current_password' )}} </ label >
2020-05-13 21:47:51 +00:00
< input type = " password " name = " currentPassword " class = " form-control " id = " currentPassword " autocomplete = " current-password " >
2020-09-01 16:46:27 +00:00
< p class = " text-sm text-muted " > {{ __ ( 'messages.profile.security_nochangepw' )}} </ p >
2020-05-13 21:47:51 +00:00
</ div >
</ form >
2021-09-03 23:44:54 +00:00
< button {{ ( $demoActive ) ? 'disabled' : '' }} class = " btn btn-success " type = " button " onclick = " document.getElementById('changeEmail').submit() " > {{ __ ( 'messages.profile.change_email' )}} </ button >
2020-05-13 21:47:51 +00:00
</ div >
2020-10-08 18:19:10 +00:00
< div class = " tab-pane fade p-3 " id = " dangerZone " role = " tabpanel " aria - labelledby = " dangerZoneTab " >
< h5 class = " card-title " > Danger Zone </ h5 >
< p class = " card-text text-bold " >< i class = " fas fa-radiation " ></ i > Careful ! Actions in these tab might result in irreversible loss of data .</ p >
< button onclick = " $ ('#deleteAccountModal').modal('show') " rel = " buttonTxtTooltip " data - toggle = " tooltip " data - placement = " top " title = " This action will delete your account permanently. " class = " btn btn-danger " type = " button " >< i class = " fas fa-user-slash " ></ i > Close Account </ button >
</ div >
2020-05-13 21:47:51 +00:00
</ div >
</ div >
</ div >
</ div >
</ div >
@ stop
2020-07-16 05:46:20 +00:00
@ section ( 'footer' )
@ include ( 'breadcrumbs.dashboard.footer' )
@ stop