28 lines
1.4 KiB
Plaintext
28 lines
1.4 KiB
Plaintext
<% local disable_avatar = me:is_logged_in_guest() %>
|
|
<div class="darkbg settings-container">
|
|
<h1>User settings</h1>
|
|
<% if infobox then %>
|
|
<% render("views.common.infobox", infobox) %>
|
|
<% end %>
|
|
<form class="avatar-form" method="post" action="<%= url_for("user_set_avatar", {username = me.username}) %>" enctype="multipart/form-data">
|
|
<img src="<%= avatar_url(me) %>">
|
|
<input id="file" type="file" name="avatar" accept="image/*" required>
|
|
<div>
|
|
<input type="submit" value="Upload avatar" <%= disable_avatar and "disabled=disabled" %>>
|
|
<% if not me:is_default_avatar() then %>
|
|
<input type="submit" value="Clear avatar" formaction="<%= url_for("user_clear_avatar", {username = me.username}) %>" formnovalidate>
|
|
<% end %>
|
|
</div>
|
|
</form>
|
|
<form method="post" action="">
|
|
<label for="status">Status</label>
|
|
<input type="text" id="status" name="status" value="<%= me.status %>" maxlength="70" placeholder="Will be shown under your username. Max 70 characters">
|
|
<label for="signature">Signature</label><br>
|
|
<% render("views.common.babycode-editor-component", {ta_name = "signature", ta_id = "signature", prefill = me.signature_original_markup, ta_placeholder = "Will be shown under each of your posts", optional = true}) %>
|
|
<input type="submit" value="Save settings">
|
|
</form>
|
|
<div>
|
|
<a class="linkbutton critical" href="<%= url_for("user_delete_confirm", {username = me.username}) %>">Delete account</a>
|
|
</div>
|
|
</div>
|