diff options
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 |
