diff options
| author | winter | 2025-03-15 18:53:29 +0000 |
|---|---|---|
| committer | winter | 2025-03-15 18:53:29 +0000 |
| commit | e0588a6113ff6b3c1000fa6c82629f81fb5e05b5 (patch) | |
| tree | ef6beb046a7dcc7542b88f0962d4e5e264895b7a /templates/actor/profile_editable.php | |
| parent | 61b122e88cc6783b4d0cf5142a22002f8e558c60 (diff) | |
[refactor] move some templates to subdirs
Diffstat (limited to 'templates/actor/profile_editable.php')
| -rw-r--r-- | templates/actor/profile_editable.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/actor/profile_editable.php b/templates/actor/profile_editable.php new file mode 100644 index 0000000..fc969bd --- /dev/null +++ b/templates/actor/profile_editable.php @@ -0,0 +1,40 @@ +<form class="fullProfile" hx-post="/fragment/profile" hx-swap="outerHTML" enctype="multipart/form-data"> + <div class="basicInfo"> + <?php call_template('actor/avatar', ['actor' => $actor]); ?> + <div> + <div class="row"> + <div class="column"> + <label for="profileDisplayName"><?= __('user.profile.displayName') ?></label> + <input id="profileDisplayName" name="displayName" type="text" required + value="<?= htmlspecialchars($actor->displayName) ?>"> + </div> + <div class="column"> + <label for="profilePronouns"><?= __('user.profile.pronouns') ?></label> + <input id="profilePronouns" name="pronouns" type="text" + value="<?= htmlspecialchars($actor->pronouns) ?>"> + </div> + </div> + <div class="handle">@<?= $actor->getFullHandle() ?></div> + <div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), $actor->created->format('Y-m-d')) ?></div> + </div> + </div> + + <div class="row"> + <label for="profileAvatar"><?= __('user.profile.changeAvatar') ?></label> + <input style="display: inline-block" type="file" id="profileAvatar" name="avatar" accept="image/*"> + <?php call_template('actor/profile_reset_avatar'); ?> + </div> + + <div class="row"> + <label for="profileBio"><?= __('user.profile.bio') ?></label> + <textarea id="profileBio" name="bio"><?= htmlspecialchars($actor->bio ?? '') ?></textarea> + </div> + + <div class="profileActions"> + <button type="button" class="secondary" hx-get="/fragment/actor/<?= $actor->id ?>" + hx-target="closest .fullProfile" hx-swap="outerHTML"> + <?= __('form.discardChanges') ?> + </button> + <button class="primary"><?= __('form.saveChanges') ?></button> + </div> +</form>
\ No newline at end of file |
