2022-09-17 15:08:24 +00:00
|
|
|
{% extends "default.html" %}
|
2022-11-19 22:20:38 +00:00
|
|
|
{% block pagetitle %}Update {{type}}{% endblock %}
|
2022-09-17 15:08:24 +00:00
|
|
|
{% block pagetype %}message{% endblock %}
|
|
|
|
{% block content %}
|
2022-12-11 23:44:34 +00:00
|
|
|
{% if error %}{{macros.alert(error, true)}}{% endif %}
|
|
|
|
{% if msg %}{{macros.alert(msg, false)}}{% endif %}
|
2022-09-17 15:08:24 +00:00
|
|
|
|
|
|
|
<div class="mx-4">
|
2022-09-18 17:38:53 +00:00
|
|
|
<h2 class="mt-5">Update {{type}}</h2>
|
2022-09-17 15:08:24 +00:00
|
|
|
<div class="settings-section rounded">
|
|
|
|
<div class="d-lg-flex">
|
|
|
|
<div class="body w-lg-100">
|
2022-09-18 17:38:53 +00:00
|
|
|
<form action="{{request.path}}" method="post" enctype="multipart/form-data">
|
2023-01-24 05:10:16 +00:00
|
|
|
<input hidden name="formkey" value="{{v|formkey}}">
|
2022-09-17 15:08:24 +00:00
|
|
|
|
2023-03-21 17:02:30 +00:00
|
|
|
<label class="mt-3" for="name">{{type}} Name (Required)</label>
|
|
|
|
<input autocomplete="off" type="text" id="name" class="form-control" name="name" maxlength="30" placeholder="Required" {% if name %}value="{{name}}"{% endif %} required>
|
|
|
|
|
|
|
|
|
2022-09-17 15:08:24 +00:00
|
|
|
<div id="image-upload-block">
|
2023-03-21 17:02:30 +00:00
|
|
|
<div><label class="mt-3">New Image {% if type == "Emoji" %}(Optional){% else %}(Required){% endif %}</label></div>
|
2022-09-17 15:08:24 +00:00
|
|
|
|
|
|
|
<img loading="lazy" id="image-preview" class="d-none" style="max-width:50%;border:5px white solid">
|
|
|
|
<label class="btn btn-secondary m-0" for="file-upload">
|
2023-03-06 18:02:12 +00:00
|
|
|
<div>Select Image</div>
|
2022-11-15 09:19:08 +00:00
|
|
|
<input autocomplete="off" id="file-upload" accept="image/*" type="file" name="image" {% if g.is_tor %}disabled{% endif %} hidden>
|
2022-09-17 15:08:24 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2023-03-21 16:50:22 +00:00
|
|
|
{% if type == "Emoji" %}
|
2023-03-21 17:02:30 +00:00
|
|
|
<label class="mt-3" for="kind">New Kind (Optional)</label>
|
2023-03-21 16:50:22 +00:00
|
|
|
<div class="input-group mb2">
|
|
|
|
<select autocomplete="off" id='kind' class="form-control" name="kind">
|
|
|
|
{% if not kind %}
|
|
|
|
<option hidden disabled selected value>-- select an option --</option>
|
|
|
|
{% endif %}
|
|
|
|
{% for entry in EMOJI_KINDS %}
|
|
|
|
<option value="{{entry}}" {% if entry == kind %}selected{% endif %}>
|
|
|
|
{{entry}}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2023-03-21 17:02:30 +00:00
|
|
|
<label class="mt-3" for="tags">Additional Tags (Optional)</label>
|
|
|
|
<input autocomplete="off" type="text" id="name" class="form-control" name="tags" maxlength="200" placeholder="Enter additional tags" {% if tags %}value="{{tags}}"{% endif %}>
|
2022-10-19 23:45:44 +00:00
|
|
|
{% endif %}
|
2023-03-21 17:02:30 +00:00
|
|
|
|
2022-09-17 15:08:24 +00:00
|
|
|
<div class="footer mt-4">
|
|
|
|
<div class="d-flex">
|
2023-03-07 00:21:08 +00:00
|
|
|
<input id="submit-btn" type="submit" class="btn btn-primary ml-auto" value="Update {{type}}">
|
2022-09-17 15:08:24 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-01 11:36:20 +00:00
|
|
|
</form>
|
2022-09-17 15:08:24 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-10-23 09:27:20 +00:00
|
|
|
{% endblock %}
|