2022-09-13 13:14:49 +00:00
|
|
|
{% extends 'manage/changelog/master.twig' %}
|
|
|
|
{% from 'macros.twig' import container_title %}
|
|
|
|
{% from '_layout/input.twig' import input_csrf, input_text, input_select, input_checkbox %}
|
|
|
|
|
2023-07-15 02:05:49 +00:00
|
|
|
{% if not change_new %}
|
|
|
|
{% set site_link = url('changelog-change', {'change': change_info.id}) %}
|
2022-09-13 13:14:49 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% block manage_content %}
|
|
|
|
<div class="container">
|
2023-07-15 02:05:49 +00:00
|
|
|
<form action="{{ url('manage-changelog-change', {'change': change_info.id|default(0)}) }}" method="post">
|
2022-09-13 13:14:49 +00:00
|
|
|
{{ input_csrf() }}
|
|
|
|
|
2023-07-15 02:05:49 +00:00
|
|
|
{{ container_title(change_new ? 'Adding a new change' : 'Editing #' ~ change_info.id) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
|
|
|
<div style="display: flex; margin: 2px 5px;">
|
2023-07-15 02:05:49 +00:00
|
|
|
{{ 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'}) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Text</div>
|
|
|
|
<div class="form__label__input">
|
2023-07-15 02:05:49 +00:00
|
|
|
<textarea class="input__textarea" name="cl_body" maxlength="65535">{{ change_info.body|default('') }}</textarea>
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Contributor Id</div>
|
|
|
|
<div class="form__label__input">
|
2023-08-02 22:12:47 +00:00
|
|
|
{{ input_text('cl_user', '', change_info.userId|default(change_author_id), 'number', '', false, {'min':1}) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Created</div>
|
|
|
|
<div class="form__label__input">
|
2023-07-15 02:05:49 +00:00
|
|
|
{{ input_text('cl_created', '', change_info.createdTime|default(-1)|date('Y-m-d\\TH:i'), 'datetime-local', '', true) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</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">
|
2023-07-15 02:05:49 +00:00
|
|
|
{{ input_checkbox('cl_tags[]', '', change_info.hasTag(tag)|default(0), 'manage__tag__checkbox', tag.id) }}
|
2022-09-13 13:14:49 +00:00
|
|
|
<div class="manage__tag__title">
|
|
|
|
{{ tag.name }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<button class="input__button">Save</button>
|
2023-07-15 02:05:49 +00:00
|
|
|
{% 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 %}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|