misuzu/templates/manage/general/emoticon.twig

40 lines
1.8 KiB
Twig
Raw Normal View History

2022-09-13 13:14:49 +00:00
{% extends 'manage/general/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from '_layout/input.twig' import input_csrf, input_text, input_checkbox, input_file, input_select, input_colour %}
{% set title = emote_info is null ? 'Adding a new emoticon' : 'Editing #' ~ emote_info.id %}
{% block manage_content %}
<div class="container manage__emotes">
{{ container_title('<i class="fas fa-grimace fa-fw"></i> ' ~ title) }}
<form method="post" action="{{ url('manage-general-emoticon', {'emote': emote_info.id|default(0)}) }}" class="manage__emote">
{{ input_csrf() }}
<label class="manage__emote__field">
<div class="manage__emote__field__name">Order</div>
{{ input_text('emote_order', 'manage__emote__field__value', emote_info.order|default(0), 'number') }}
</label>
<label class="manage__emote__field">
<div class="manage__emote__field__name">Hierarchy</div>
{{ input_text('emote_hierarchy', 'manage__emote__field__value', emote_info.rank|default(0), 'number') }}
</label>
<label class="manage__emote__field">
<div class="manage__emote__field__name">URL</div>
{{ input_text('emote_url', 'manage__emote__field__value', emote_info.url|default(), 'text', '', true) }}
</label>
<label class="manage__emote__field">
<div class="manage__emote__field__name">Strings</div>
{{ input_text('emote_strings', 'manage__emote__field__value', emote_info.strings|column('emote_string')|join(' '), 'text', '', true) }}
</label>
<div class="manage__emote__actions">
<button class="input__button">Save</button>
</div>
</form>
</div>
{% endblock %}