master
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 %}
<div class="mx-4">
<h2 class="mt-5">Update {{type}}</h2>
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="body w-lg-100">
<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">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="body w-lg-100">
<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">
<div class="section-title mt-3">
<hr>
<h5>Name of {{type}} you wanna alter</h5>
<hr>
</div>
<div class="section-title mt-3">
<hr>
<h5>Name of {{type}} you wanna alter</h5>
<hr>
</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">
<hr>
<h5>Change at least one of these values</h5>
<hr>
</div>
<div class="section-title mt-4">
<hr>
<h5>Change at least one of these values</h5>
<hr>
</div>
<div id="image-upload-block">
<div><label>New Image</label></div>
<div id="image-upload-block">
<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()">
<label class="btn btn-secondary m-0" for="file-upload">
<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>
</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()">
<label class="btn btn-secondary m-0" for="file-upload">
<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>
</label>
</div>
{% if type == "Emoji" %}
<label class="mt-3" for="kind">New Kind</label>
<div class="input-group">
<select autocomplete="off" id='kind' class="form-control" name="kind">
<option hidden disabled selected value>-- select an option -- (optional)</option>
{% for entry in EMOJI_KINDS %}
<option value="{{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
{% if type == "Emoji" %}
<label class="mt-3" for="kind">New Kind</label>
<div class="input-group">
<select autocomplete="off" id='kind' class="form-control" name="kind">
<option hidden disabled selected value>-- select an option -- (optional)</option>
{% for entry in EMOJI_KINDS %}
<option value="{{entry}}">
{{entry}}
</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>
{% endfor %}
</select>
</div>
</form>
</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 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>
{% endblock %}