misuzu/templates/manage/changelog/change.twig
flash 383e2ed0e0 Rewrote the user information class.
This one took multiple days and it pretty invasive into the core of Misuzu so issue might (will) arise, there's also some features that have gone temporarily missing in the mean time and some inefficiencies introduced that will be fixed again at a later time.
The old class isn't gone entirely because I still have to figure out what I'm gonna do about validation, but for the most part this knocks out one of the "layers of backwards compatibility", as I've been referring to it, and is moving us closer to a future where Flashii actually gets real updates.
If you run into anything that's broken and you're inhibited from reporting it through the forum, do it through chat or mail me at flashii-issues@flash.moe.
2023-08-02 22:12:47 +00:00

65 lines
2.9 KiB
Twig

{% extends 'manage/changelog/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from '_layout/input.twig' import input_csrf, input_text, input_select, input_checkbox %}
{% if not change_new %}
{% set site_link = url('changelog-change', {'change': change_info.id}) %}
{% endif %}
{% block manage_content %}
<div class="container">
<form action="{{ url('manage-changelog-change', {'change': change_info.id|default(0)}) }}" method="post">
{{ input_csrf() }}
{{ container_title(change_new ? 'Adding a new change' : 'Editing #' ~ change_info.id) }}
<div style="display: flex; margin: 2px 5px;">
{{ input_select('cl_action', change_actions, change_info.action|default('add')) }}
{{ input_text('cl_summary', '', change_info.summary|default(''), 'text', '', true, {'maxlength': 255, 'style': 'flex-grow: 1'}) }}
</div>
<label class="form__label">
<div class="form__label__text">Text</div>
<div class="form__label__input">
<textarea class="input__textarea" name="cl_body" maxlength="65535">{{ change_info.body|default('') }}</textarea>
</div>
</label>
<label class="form__label">
<div class="form__label__text">Contributor Id</div>
<div class="form__label__input">
{{ input_text('cl_user', '', change_info.userId|default(change_author_id), 'number', '', false, {'min':1}) }}
</div>
</label>
<label class="form__label">
<div class="form__label__text">Created</div>
<div class="form__label__input">
{{ input_text('cl_created', '', change_info.createdTime|default(-1)|date('Y-m-d\\TH:i'), 'datetime-local', '', true) }}
</div>
</label>
<div class="manage__tags">
{% for tag in change_tags %}
<label class="manage__tag">
<div class="manage__tag__background"></div>
<div class="manage__tag__content">
{{ input_checkbox('cl_tags[]', '', change_info.hasTag(tag)|default(0), 'manage__tag__checkbox', tag.id) }}
<div class="manage__tag__title">
{{ tag.name }}
</div>
</div>
</label>
{% endfor %}
</div>
<div>
<button class="input__button">Save</button>
{% if not change_new %}
<a href="{{ url('manage-changelog-change-delete', {'change': change_info.id}) }}" class="input__button input__button--destroy" onclick="return confirm('Are you sure?');">Delete</a>
{% endif %}
</div>
</form>
</div>
{% endblock %}