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 16:44:34 +02:00
< h2 > Account </ h2 >
2020-06-14 20:15:53 +02:00
< div class = " box " >
2023-09-24 00:44:44 +02:00
< form id = " accountForm " action = " /account " method = " post " data - reload - on - success = " true " data - observe - inputs = " email,username,password_new,password_new_confirm " >
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 modify your account .</ p >
< div class = " inputWithButton " >
2023-09-24 00:44:44 +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 modify 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 modify 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-18 16:23:30 +02:00
< hr >
2023-09-24 00:44:44 +02:00
< input type = " email " class = " text big fullWidth " name = " email " placeholder = " Email address " autocomplete = " username " value = " <?= $user['email'] ?> " >
< input type = " username " class = " text big fullWidth marginTop " name = " username " placeholder = " Username " value = " <?= $user['username'] ?> " >
2023-05-02 13:32:42 +02:00
< input type = " password " class = " text big fullWidth marginTop " name = " password_new " placeholder = " New password " autocomplete = " new-password " minlength = " 6 " >
< input type = " password " class = " text big fullWidth marginTop " name = " password_new_confirm " placeholder = " New password confirmation " autocomplete = " new-password " minlength = " 6 " >
2020-06-25 16:44:34 +02:00
< p id = " accountFormError " class = " formError justify marginTop " ></ p >
2020-06-14 20:15:53 +02:00
< div class = " right marginTop " >
2020-06-25 19:18:28 +02:00
< button type = " submit " name = " submit " disabled > Save </ button >
2020-06-14 20:15:53 +02:00
</ div >
2020-06-25 20:26:33 +02:00
< hr >
< div class = " center " >
< a class = " button red " href = " /account/delete " title = " Delete account " > Delete account </ a >
</ div >
2020-06-14 20:15:53 +02:00
</ form >
</ div >
2020-06-27 00:23:57 +02:00
@ endsection