2022-09-09 09:13:50 +00:00
{% extends "default.html" %}
2023-03-18 14:04:56 +00:00
{% block pagetitle %}Submit Emojis{% endblock %}
2022-09-09 23:57:45 +00:00
{% block pagetype %}message{% endblock %}
2022-09-09 09:13:50 +00:00
{% block content %}
< div class = "mx-4" >
2023-03-18 14:04:56 +00:00
< h2 class = "mt-5" > Submit Emoji< / h2 >
2022-09-09 09:13:50 +00:00
< div class = "settings-section rounded" >
< div class = "d-lg-flex" >
< div class = "body w-lg-100" >
2023-08-11 21:50:23 +00:00
< form action = "/submit/emojis" method = "post" enctype = "multipart/form-data" data-nonce = "{{g.nonce}}" data-onsubmit = "sendFormXHRReload(this)" >
2023-01-24 05:10:16 +00:00
< input hidden name = "formkey" value = "{{v|formkey}}" >
2022-09-09 09:13:50 +00:00
< div id = "image-upload-block" >
< div > < label class = "mt-3" > Image< / label > < / div >
2022-09-11 06:33:36 +00:00
< img loading = "lazy" id = "image-preview" class = "d-none" style = "max-width:50%;border:5px white solid" >
2022-09-09 09:13:50 +00:00
< 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-09 09:13:50 +00:00
< / label >
< / div >
2023-03-18 13:34:04 +00:00
< label class = "mt-3" for = "kind" > Kind< / label >
2023-03-21 17:12:38 +00:00
< div class = "input-group" >
2023-03-18 15:28:58 +00:00
< select autocomplete = "off" id = 'kind' class = "form-control" name = "kind" required >
2023-03-18 17:18:44 +00:00
{% if not kind %}
< option hidden disabled selected value > -- select an option --< / option >
{% endif %}
2023-03-21 16:50:22 +00:00
{% for entry in EMOJI_KINDS %}
2023-03-18 17:18:44 +00:00
< option value = "{{entry}}" { % if entry = = kind % } selected { % endif % } >
2023-03-18 13:34:04 +00:00
{{entry}}
< / option >
{% endfor %}
< / select >
< / div >
2023-03-18 15:18:19 +00:00
< label class = "mt-3" for = "name" > Emoji Name< / label >
2023-03-18 13:34:04 +00:00
< input autocomplete = "off" type = "text" id = "name" class = "form-control" name = "name" maxlength = "30" pattern = '[a-zA-Z0-9]{1,30}' placeholder = "Required" value = "{{name}}" required >
2022-09-09 09:13:50 +00:00
< label class = "mt-3" for = "author" > Author< / label >
2023-08-18 18:59:13 +00:00
< input autocomplete = "off" type = "text" id = "author" class = "form-control" name = "author" maxlength = "30" pattern = '[a-zA-Z0-9_\-]{1,30}' placeholder = "Required" value = "{{username}}" required >
2022-09-09 09:13:50 +00:00
2022-09-09 09:39:03 +00:00
< label class = "mt-3" for = "tags" > Tags (must be separated by spaces)< / label >
2022-09-13 11:00:47 +00:00
< input autocomplete = "off" type = "text" id = "tags" class = "form-control" name = "tags" maxlength = "200" pattern = '[a-zA-Z0-9: ]{1,200}' placeholder = "Required" value = "{{tags}}" required >
2022-09-09 09:13:50 +00:00
2023-09-29 07:15:29 +00:00
{% if FEATURES['NSFW_MARKING'] %}
< div class = "custom-control custom-checkbox mt-4" >
< input autocomplete = "off" type = "checkbox" class = "custom-control-input" id = "emoji-over-18" name = "over_18" data-nonce = "{{g.nonce}}" data-onchange = "savetext()" >
2023-09-29 20:57:58 +00:00
< label class = "custom-control-label" for = "emoji-over-18" > 18+< / label >
2023-09-29 07:15:29 +00:00
< / div >
{% endif %}
2022-09-09 09:13:50 +00:00
< div class = "footer mt-5" >
< div class = "d-flex" >
2023-03-18 14:04:56 +00:00
< input id = "submit-btn" disabled type = "submit" class = "btn btn-primary ml-auto" value = "Submit Emoji" >
2022-09-09 09:13:50 +00:00
< / div >
< / div >
2023-01-01 11:36:20 +00:00
< / form >
2022-09-09 09:13:50 +00:00
< / div >
< / div >
< / div >
< / div >
2023-03-18 13:34:04 +00:00
< script defer src = "{{'js/submit_emojis.js' | asset}}" > < / script >
2022-09-09 09:13:50 +00:00
2023-01-27 13:02:23 +00:00
< h2 class = "mt-5 mx-4" > Pending Approval< / h2 >
2022-09-09 09:13:50 +00:00
< div class = "row mt-5 mx-4" >
< div class = "col px-0" >
< div class = "settings" >
2023-03-18 14:04:56 +00:00
{% for emoji in emojis %}
< div id = "{{emoji.name}}-emoji" class = "settings-section rounded" >
2022-09-09 09:13:50 +00:00
< div class = "d-lg-flex" >
< div class = "body w-lg-100" >
2023-01-24 05:10:16 +00:00
< input hidden name = "formkey" value = "{{v|formkey}}" >
2023-01-01 11:36:20 +00:00
2022-09-09 09:13:50 +00:00
< div > < label class = "mt-3" > Image< / label > < / div >
2023-03-21 14:16:18 +00:00
< img loading = "lazy" src = "{{SITE_FULL_IMAGES}}/asset_submissions/emojis/{{emoji.name}}.webp?s={{range(1, 10000000)|random}}" style = "max-width:50%;border:5px white solid" >
2023-01-01 11:36:20 +00:00
2023-03-18 14:04:56 +00:00
< div > < label class = "mt-3" for = "{{emoji.name}}-kind" > Kind< / label > < / div >
2023-03-21 17:12:38 +00:00
< div class = "input-group" >
2023-03-18 17:06:32 +00:00
< select autocomplete = "off" id = '{{emoji.name}}-kind' class = "form-control" name = "kind" required { % if v . admin_level < PERMS [ ' MODERATE_PENDING_SUBMITTED_ASSETS ' ] % } disabled readonly { % endif % } >
2023-03-21 16:50:22 +00:00
{% for entry in EMOJI_KINDS %}
2023-03-18 14:04:56 +00:00
< option value = "{{entry}}" { % if emoji . kind = =entry % } selected { % endif % } >
2023-03-18 13:34:04 +00:00
{{entry}}
< / option >
{% endfor %}
< / select >
< / div >
2023-05-05 21:45:25 +00:00
2023-03-18 14:04:56 +00:00
< div > < label class = "mt-3" for = "{{emoji.name}}-submitter" > Submitter< / label > < / div >
< input autocomplete = "off" type = "text" id = "{{emoji.name}}-submitter" class = "form-control" maxlength = "30" value = "{{emoji.submitter}}" readonly >
2022-09-10 05:37:11 +00:00
2023-03-18 14:04:56 +00:00
< label class = "mt-3" for = "{{emoji.name}}-author" > Author< / label >
< input autocomplete = "off" type = "text" id = "{{emoji.name}}-author" class = "form-control" maxlength = "30" value = "{{emoji.author}}" readonly >
2022-09-10 05:37:11 +00:00
2023-03-18 15:18:19 +00:00
< label class = "mt-3" for = "{{emoji.name}}-name" > Emoji Name< / label >
2023-03-18 14:04:56 +00:00
< input autocomplete = "off" type = "text" id = "{{emoji.name}}-name" class = "form-control" name = "name" maxlength = "30" value = "{{emoji.name}}" pattern = 'emoji[a-z0-9]{1,24}' placeholder = "Required" required { % if v . admin_level < PERMS [ ' MODERATE_PENDING_SUBMITTED_ASSETS ' ] % } readonly { % endif % } >
2023-01-01 11:36:20 +00:00
2023-03-18 14:04:56 +00:00
< label class = "mt-3" for = "{{emoji.name}}-tags" > Tags< / label >
< input autocomplete = "off" type = "text" id = "{{emoji.name}}-tags" class = "form-control" name = "tags" maxlength = "200" value = "{{emoji.tags}}" pattern = '[a-z0-9: ]{1,200}' placeholder = "Required" required { % if v . admin_level < PERMS [ ' MODERATE_PENDING_SUBMITTED_ASSETS ' ] % } readonly { % endif % } >
2023-09-29 07:15:29 +00:00
{% if FEATURES['NSFW_MARKING'] %}
< div class = "custom-control custom-checkbox mt-4" >
< input autocomplete = "off" type = "checkbox" class = "custom-control-input" id = "{{emoji.name}}-over-18" name = "over_18" data-nonce = "{{g.nonce}}" data-onchange = "savetext()" { % if v . admin_level < PERMS [ ' MODERATE_PENDING_SUBMITTED_ASSETS ' ] % } readonly { % endif % } { % if emoji . over_18 % } checked { % endif % } >
2023-09-29 20:57:58 +00:00
< label class = "custom-control-label" for = "{{emoji.name}}-over-18" > 18+< / label >
2023-09-29 07:15:29 +00:00
< / div >
{% endif %}
2022-09-09 09:13:50 +00:00
< / div >
< / div >
2023-03-18 14:04:56 +00:00
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] or v.id == emoji.submitter_id %}
2023-01-29 13:51:34 +00:00
< div class = "d-flex my-4 mx-3" >
2023-09-29 07:59:27 +00:00
< input autocomplete = "off" type = "text" id = "{{emoji.name}}-reason" class = "form-control mr-4" name = "reason" placeholder = "Rejection reason..." maxlength = "500" { % if v . admin_level < PERMS [ ' MODERATE_PENDING_SUBMITTED_ASSETS ' ] % } hidden { % endif % } >
2023-08-05 10:30:27 +00:00
< button type = "button" class = "btn btn-danger ml-auto" data-nonce = "{{g.nonce}}" data-onclick = "remove_emoji(this, '{{emoji.name}}')" > Remove< / button >
2023-01-29 13:51:34 +00:00
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %}
2023-09-29 07:59:27 +00:00
< button type = "button" class = "btn btn-success ml-3 mr-1" data-nonce = "{{g.nonce}}" data-onclick = "approve_emoji(this, '{{emoji.name}}')" > Approve< / button >
2023-01-29 13:51:34 +00:00
{% endif %}
< / div >
{% endif %}
2022-09-09 09:13:50 +00:00
< / div >
{% endfor %}
< / div >
< / div >
< / div >
{% endblock %}