2018-08-15 03:12:58 +02:00
|
|
|
{% extends 'manage/changelog/master.twig' %}
|
2018-10-22 21:53:21 +02:00
|
|
|
{% from 'macros.twig' import container_title %}
|
2019-04-02 21:02:35 +02:00
|
|
|
{% from '_layout/input.twig' import input_csrf, input_text, input_select, input_checkbox %}
|
2018-07-07 03:32:09 +02:00
|
|
|
|
2019-04-02 21:02:35 +02:00
|
|
|
{% if edit_change is not null %}
|
2019-02-28 22:52:39 +01:00
|
|
|
{% set site_link = url('changelog-change', {'change': edit_change.change_id}) %}
|
2018-09-25 23:21:11 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2018-08-15 19:20:41 +02:00
|
|
|
{% block manage_content %}
|
2018-07-07 03:32:09 +02:00
|
|
|
<div class="container">
|
2019-04-02 21:02:35 +02:00
|
|
|
<form action="?v=change{{ edit_change is not null ? '&c=' ~ edit_change.change_id : '' }}" method="post">
|
2018-10-25 03:35:53 +02:00
|
|
|
{{ input_csrf('changelog_add') }}
|
2018-10-02 21:16:42 +02:00
|
|
|
|
2019-04-02 21:02:35 +02:00
|
|
|
{{ container_title(edit_change is not null ? 'Editing #' ~ edit_change.change_id : 'Adding a new change') }}
|
2018-07-07 03:32:09 +02:00
|
|
|
|
2018-12-05 20:57:56 +01:00
|
|
|
<div style="display: flex; margin: 2px 5px;">
|
2019-04-12 00:31:23 +02:00
|
|
|
{{ input_select('change[action]', changelog_actions, edit_change.change_action|default(0), 'action_name', 'action_id') }}
|
2019-04-02 21:02:35 +02:00
|
|
|
{{ input_text('change[log]', '', edit_change is not null ? edit_change.change_log : '', 'text', '', true, {'maxlength':255,'style':'flex-grow:1'}) }}
|
2018-12-05 20:57:56 +01:00
|
|
|
</div>
|
2018-07-07 03:32:09 +02:00
|
|
|
|
2018-12-05 20:57:56 +01:00
|
|
|
<label class="form__label">
|
2018-07-07 03:32:09 +02:00
|
|
|
<div class="form__label__text">Text</div>
|
|
|
|
<div class="form__label__input">
|
2019-04-02 21:02:35 +02:00
|
|
|
<textarea class="input__textarea" name="change[text]" maxlength="65535">{{ edit_change is not null ? edit_change.change_text : '' }}</textarea>
|
2018-07-07 03:32:09 +02:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Action</div>
|
|
|
|
<div class="form__label__input">
|
2018-12-05 20:57:56 +01:00
|
|
|
|
2018-07-07 03:32:09 +02:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Contributor Id</div>
|
|
|
|
<div class="form__label__input">
|
2018-10-27 21:06:16 +02:00
|
|
|
{{ input_text('change[user]', '', edit_change.user_id|default(current_user.user_id), 'number', '', false, {'min':1}) }}
|
2018-07-07 03:32:09 +02:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Created</div>
|
|
|
|
<div class="form__label__input">
|
2019-04-02 21:02:35 +02:00
|
|
|
{{ input_text('change[created]', '', (edit_change is not null ? edit_change.change_created : ''|date('Y-m-d H:i:s')), 'text', '', true) }}
|
2018-07-07 03:32:09 +02:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
2019-04-02 21:02:35 +02:00
|
|
|
<div class="manage__tags">
|
|
|
|
{% for tag in edit_change_tags %}
|
|
|
|
<label class="manage__tag">
|
|
|
|
<div class="manage__tag__background"></div>
|
|
|
|
<div class="manage__tag__content">
|
|
|
|
{{ input_checkbox('tags[]', '', tag.has_tag, 'manage__tag__checkbox', tag.tag_id) }}
|
|
|
|
<div class="manage__tag__title">
|
|
|
|
{{ tag.tag_name }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
2018-07-07 03:32:09 +02:00
|
|
|
<div>
|
2018-10-02 21:16:42 +02:00
|
|
|
<button class="input__button">Save</button>
|
2018-07-07 03:32:09 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|