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-06-08 23:46:24 +02:00
|
|
|
{% if change is not null %}
|
|
|
|
{% set site_link = url('changelog-change', {'change': 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-06-08 23:46:24 +02:00
|
|
|
<form action="{{ url('manage-changelog-change', {'change': change.change_id|default(0)}) }}" method="post">
|
2019-06-10 17:21:53 +02:00
|
|
|
{{ input_csrf() }}
|
2018-10-02 21:16:42 +02:00
|
|
|
|
2019-06-08 23:46:24 +02:00
|
|
|
{{ container_title(change is not null ? 'Editing #' ~ 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-06-08 23:46:24 +02:00
|
|
|
{{ input_select('change[action]', change_actions, change.change_action|default(0), 'action_name', 'action_id') }}
|
|
|
|
{{ input_text('change[log]', '', change is not null ? 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-06-08 23:46:24 +02:00
|
|
|
<textarea class="input__textarea" name="change[text]" maxlength="65535">{{ change is not null ? change.change_text : '' }}</textarea>
|
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">
|
2019-06-08 23:46:24 +02:00
|
|
|
{{ input_text('change[user]', '', 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-06-08 23:46:24 +02:00
|
|
|
{{ input_text('change[created]', '', (change is not null ? 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">
|
2019-06-08 23:46:24 +02:00
|
|
|
{% for tag in change_tags %}
|
2019-04-02 21:02:35 +02:00
|
|
|
<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 %}
|