aboutsummaryrefslogtreecommitdiff
path: root/views/user/update/index.php
blob: b1eace83948fe1ff2530647a9cb8dd9bf50dfafa (plain) (blame)
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
<?php
    $user = require_login();
?>

<h1>Change your username</h1>

<form action="#" method="POST" class="font-115 flex-col-centered max-width-20 center-margin">
    <input type="hidden" name="method" value="PATCH">
    <?php if (isset($username_status)): ?>
        <?php if ($username_status !== ""): ?>
            <p class="item error"><span>
                <strong>Error:</strong> <?= $username_status ?>
            </span></p>
        <?php endif; ?>
    <?php endif; ?>

    <input type="hidden" name="type" value="username">
    <input type="text" name="username" placeholder="New Username">
    <input type="submit" value="Update username">
</form>

<div class="user-blank-afterspace"></div>

<h1>Change your password</h1>

<form action="#" method="POST" class="font-115 flex-col-centered max-width-20 center-margin">
    <input type="hidden" name="method" value="PATCH">
    <?php if (isset($password_status)): ?>
        <?php if ($password_status !== ""): ?>
            <p class="item error"><span>
                <strong>Error:</strong> <?= $password_status ?>
            </span></p>
        <?php endif; ?>
    <?php endif; ?>

    <input type="hidden" name="type" value="password">
    <input type="password" name="password" placeholder="New Password">
    <input type="submit" value="Update password">
</form>

<div class="user-blank-afterspace"></div>

<h1>Delete your account</h1>

<form action="/user/delete" method="GET" class="font-115 flex-col-centered max-width-20 center-margin">
    <input type="hidden" name="username" value="<?= $user->Username ?>">
    <input type="submit" value="Delete">
</form>