2020-06-28 19:32:30 +02:00
@ js ( js / account / account . js )
2020-06-28 03:18:51 +02:00
2020-06-28 19:32:30 +02:00
@ extends ( templates / layout_normal )
2020-06-27 00:23:57 +02:00
2020-06-28 19:32:30 +02:00
@ section ( main )
2020-06-25 20:26:33 +02:00
< h2 > Delete account </ h2 >
< div class = " box " >
2020-06-25 22:35:04 +02:00
< form id = " deleteAccountForm " action = " /account/delete " method = " post " data - redirect - on - success = " / " >
2020-06-28 03:18:51 +02:00
< p class = " justify marginBottom " > Are you sure you want to delete your account ? This cannot be undone !</ p >
2023-05-02 13:32:42 +02:00
< input type = " hidden " name = " email " autocomplete = " username " value = " <?= $user['email'] ?> " >
2020-06-28 03:18:51 +02:00
< ? php if ( $user [ 'password' ] !== null && $user [ 'google_sub' ] !== null ) : ?>
< p class = " justify small " > Please confirm your identity with your password or with Google to delete your account .</ p >
< div class = " inputWithButton " >
2023-05-02 13:32:42 +02:00
< input type = " password " class = " text " name = " password " placeholder = " Current password " autocomplete = " current-password " required minlength = " 6 " autofocus ><!--
2020-06-28 03:18:51 +02:00
-->< button id = " authenticateWithGoogleButton " class = " yellow " type = " button " > Google </ button >
</ div >
< ? php elseif ( $user [ 'password' ] !== null ) : ?>
< p class = " justify small " > Please confirm your identity with your password to delete your account .</ p >
2023-05-02 13:32:42 +02:00
< input type = " password " class = " text big fullWidth " name = " password " placeholder = " Current password " autocomplete = " current-password " required minlength = " 6 " autofocus >
2020-06-28 03:18:51 +02:00
< ? php elseif ( $user [ 'google_sub' ] !== null ) : ?>
< p class = " justify small " > Please confirm your identity with Google to delete your account .</ p >
< div class = " inputWithButton " >
2022-05-26 15:55:45 +02:00
< input type = " text " class = " text " name = " password " placeholder = " Authenticate with Google... " disabled ><!--
2020-06-28 03:18:51 +02:00
-->< button id = " authenticateWithGoogleButton " class = " yellow " type = " button " > Google </ button >
</ div >
< ? php endif ; ?>
2020-06-25 20:26:33 +02:00
< p id = " deleteAccountFormError " class = " formError justify marginTop " ></ p >
< div class = " right marginTop " >
2020-06-28 03:18:51 +02:00
< button class = " red marginRight " type = " submit " name = " submit " > Delete account </ button ><!--
-->< a class = " button gray marginTop " href = " /account " title = " Back to account " > Cancel </ a >
2020-06-25 20:26:33 +02:00
</ div >
</ form >
</ div >
2020-06-27 00:23:57 +02:00
@ endsection