2018-08-15 01:12:58 +00:00
|
|
|
{% extends 'manage/changelog/master.twig' %}
|
2018-10-22 19:53:21 +00:00
|
|
|
{% from 'macros.twig' import container_title %}
|
2018-10-25 01:35:53 +00:00
|
|
|
{% from '_layout/input.twig' import input_csrf, input_text %}
|
2018-07-07 01:32:09 +00:00
|
|
|
|
2018-09-25 21:21:11 +00:00
|
|
|
{% if edit_change is defined %}
|
|
|
|
{% set site_link = '/changelog.php?c=' ~ edit_change.change_id %}
|
|
|
|
{% endif %}
|
|
|
|
|
2018-08-15 17:20:41 +00:00
|
|
|
{% block manage_content %}
|
2018-07-07 01:32:09 +00:00
|
|
|
<div class="container">
|
|
|
|
<form action="?v=change{{ edit_change is defined ? '&c=' ~ edit_change.change_id : '' }}" method="post">
|
2018-10-25 01:35:53 +00:00
|
|
|
{{ input_csrf('changelog_add') }}
|
2018-10-02 19:16:42 +00:00
|
|
|
|
2018-10-22 19:53:21 +00:00
|
|
|
{{ container_title(edit_change is defined ? 'Editing #' ~ edit_change.change_id : 'Adding a new change') }}
|
2018-07-07 01:32:09 +00:00
|
|
|
|
|
|
|
<label class="form__label" style="width:100%">
|
|
|
|
<div class="form__label__text">Log</div>
|
|
|
|
<div class="form__label__input">
|
2018-10-25 01:35:53 +00:00
|
|
|
{{ input_text('change[log]', '', edit_change is defined ? edit_change.change_log : '', 'text', '', true, {'maxlength':255}) }}
|
2018-07-07 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label" style="width:100%">
|
|
|
|
<div class="form__label__text">Text</div>
|
|
|
|
<div class="form__label__input">
|
2018-08-15 02:25:42 +00:00
|
|
|
<textarea class="input__textarea" name="change[text]" maxlength="65535">{{ edit_change is defined ? edit_change.change_text : '' }}</textarea>
|
2018-07-07 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Action</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
<select name="change[action]" class="input input--select">
|
|
|
|
{% for action in changelog_actions %}
|
|
|
|
<option value="{{ action.action_id }}"{% if edit_change is defined and action.action_id == edit_change.action_id %} selected{% endif %}>
|
|
|
|
{{ action.action_name }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Contributor Id</div>
|
|
|
|
<div class="form__label__input">
|
2018-08-15 02:25:42 +00:00
|
|
|
<input class="input__text" type="number" value="{{ edit_change is defined ? edit_change.user_id : current_user.user_id }}" name="change[user]" min="1">
|
2018-07-07 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Created</div>
|
|
|
|
<div class="form__label__input">
|
2018-10-25 01:35:53 +00:00
|
|
|
{{ input_text('change[created]', '', (edit_change is defined ? edit_change.change_created : ''|date('Y-m-d H:i:s')), 'text', '', true) }}
|
2018-07-07 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<div>
|
2018-10-02 19:16:42 +00:00
|
|
|
<button class="input__button">Save</button>
|
2018-07-07 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if edit_change is defined %}
|
2018-10-22 19:53:21 +00:00
|
|
|
{{ container_title('Tags') }}
|
2018-07-07 01:32:09 +00:00
|
|
|
|
|
|
|
{% if edit_change_assigned_tags|length > 0 %}
|
|
|
|
<form class="container" method="post" action="" style="display:inline-block">
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Assigned Tags</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
<select name="remove_tag" class="input input--select">
|
|
|
|
{% for tag in edit_change_assigned_tags %}
|
|
|
|
<option value="{{ tag.tag_id }}">
|
|
|
|
{{ tag.tag_name }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<div>
|
2018-10-02 19:16:42 +00:00
|
|
|
<button class="input__button" name="csrf" value="{{ csrf_token('changelog_add') }}">Remove</button>
|
2018-07-07 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if edit_change_available_tags|length > 0 %}
|
|
|
|
<form class="container" method="post" action="" style="display:inline-block">
|
|
|
|
<label class="form__label">
|
|
|
|
<div class="form__label__text">Available Tags</div>
|
|
|
|
<div class="form__label__input">
|
|
|
|
<select name="add_tag" class="input input--select">
|
|
|
|
{% for tag in edit_change_available_tags %}
|
|
|
|
<option value="{{ tag.tag_id }}">
|
|
|
|
{{ tag.tag_name }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<div>
|
2018-10-02 19:16:42 +00:00
|
|
|
<button class="input__button" name="csrf" value="{{ csrf_token('changelog_add') }}">Add</button>
|
2018-07-07 01:32:09 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|