pull/226/head
Aevann 2024-04-05 11:13:37 +02:00
parent b000060ba3
commit ac229231e2
1 changed files with 65 additions and 64 deletions

View File

@ -4,79 +4,80 @@
{% block content %} {% block content %}
<div class="mx-4"> <div class="mx-4">
<h2 class="mt-5">Update {{type}}</h2> <h2 class="mt-5">Update {{type}}</h2>
<div class="settings-section rounded"> <div class="settings-section rounded">
<div class="d-lg-flex"> <div class="d-lg-flex">
<div class="body w-lg-100"> <div class="body w-lg-100">
<form action="{{request.path}}" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)"> <form action="{{request.path}}" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}" class="notranslate" translate="no"> <input hidden name="formkey" value="{{v|formkey}}" class="notranslate" translate="no">
<div class="section-title mt-3"> <div class="section-title mt-3">
<hr> <hr>
<h5>Name of {{type}} you wanna alter</h5> <h5>Name of {{type}} you wanna alter</h5>
<hr> <hr>
</div> </div>
<input autocomplete="off" type="text" id="name" class="form-control" name="name" maxlength="30" required> <input autocomplete="off" type="text" id="name" class="form-control" name="name" maxlength="30" required>
<div class="section-title mt-4"> <div class="section-title mt-4">
<hr> <hr>
<h5>Change at least one of these values</h5> <h5>Change at least one of these values</h5>
<hr> <hr>
</div> </div>
<div id="image-upload-block"> <div id="image-upload-block">
<div><label>New Image</label></div> <div><label>New Image</label></div>
<img loading="lazy" id="image-preview" class="d-none" style="max-width:50%;border:5px white solid" data-nonce="{{g.nonce}}" data-onclick="expandImage()"> <img loading="lazy" id="image-preview" class="d-none" style="max-width:50%;border:5px white solid" data-nonce="{{g.nonce}}" data-onclick="expandImage()">
<label class="btn btn-secondary m-0" for="file-upload"> <label class="btn btn-secondary m-0" for="file-upload">
<div>Select Image<br>(optional)</div> <div>Select Image<br>(optional)</div>
<input autocomplete="off" id="file-upload" accept="image/*" type="file" name="image" {% if g.is_tor %}disabled{% endif %} hidden> <input autocomplete="off" id="file-upload" accept="image/*" type="file" name="image" {% if g.is_tor %}disabled{% endif %} hidden>
</label> </label>
</div> </div>
{% if type == "Emoji" %} {% if type == "Emoji" %}
<label class="mt-3" for="kind">New Kind</label> <label class="mt-3" for="kind">New Kind</label>
<div class="input-group"> <div class="input-group">
<select autocomplete="off" id='kind' class="form-control" name="kind"> <select autocomplete="off" id='kind' class="form-control" name="kind">
<option hidden disabled selected value>-- select an option -- (optional)</option> <option hidden disabled selected value>-- select an option -- (optional)</option>
{% for entry in EMOJI_KINDS %} {% for entry in EMOJI_KINDS %}
<option value="{{entry}}"> <option value="{{entry}}">
{{entry}} {{entry}}
</option>
{% endfor %}
</select>
</div>
{% endif %}
<label class="mt-3" for="new_name">New Name</label>
<input autocomplete="off" type="text" id="new_name" class="form-control" name="new_name" maxlength="30" placeholder="Optional">
{% if type == "Emoji" %}
<label class="mt-3" for="tags">Additional Tags</label>
<input autocomplete="off" type="text" id="name" class="form-control" name="tags" maxlength="200" placeholder="Optional">
<label class="mt-3" for="nsfw">New NSFW Value</label>
<div class="input-group">
<select autocomplete="off" id='nsfw' class="form-control" name="nsfw">
<option hidden disabled selected value>-- select an option -- (optional)</option>
<option value="NSFW">
NSFW
</option> </option>
<option value="not_NSFW"> {% endfor %}
Not NSFW </select>
</option>
</select>
</div>
{% endif %}
<div class="footer mt-4">
<div class="d-flex">
<input id="submit-btn" type="submit" class="btn btn-primary ml-auto" value="Update {{type}}">
</div>
</div> </div>
</form> {% endif %}
</div>
<label class="mt-3" for="new_name">New Name</label>
<input autocomplete="off" type="text" id="new_name" class="form-control" name="new_name" maxlength="30" placeholder="Optional">
{% if type == "Emoji" %}
<label class="mt-3" for="tags">Additional Tags</label>
<input autocomplete="off" type="text" id="name" class="form-control" name="tags" maxlength="200" placeholder="Optional">
<label class="mt-3" for="nsfw">New NSFW Value</label>
<div class="input-group">
<select autocomplete="off" id='nsfw' class="form-control" name="nsfw">
<option hidden disabled selected value>-- select an option -- (optional)</option>
<option value="NSFW">
NSFW
</option>
<option value="not_NSFW">
Not NSFW
</option>
</select>
</div>
{% endif %}
<div class="footer mt-4">
<div class="d-flex">
<input id="submit-btn" type="submit" class="btn btn-primary ml-auto" value="Update {{type}}">
</div>
</div>
</form>
</div> </div>
</div> </div>
</div>
</div> </div>
{% endblock %} {% endblock %}