61 lines
2.9 KiB
Twig
61 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_checkbox %}
|
|
|
|
{% block manage_content %}
|
|
<div class="container">
|
|
<form action="?v=action{{ edit_action is defined ? '&a=' ~ edit_action.action_id : '' }}" method="post">
|
|
{{ input_csrf('changelog_action') }}
|
|
|
|
{{ container_title(edit_action is defined ? 'Editing ' ~ edit_action.action_name ~ ' (' ~ edit_action.action_id ~ ')' : 'Adding a new action') }}
|
|
|
|
<label class="form__label">
|
|
<div class="form__label__text">Name</div>
|
|
<div class="form__label__input">
|
|
{{ input_text('action[name]', '', edit_action is defined ? edit_action.action_name : '', 'text', '', true, {'maxlength':50}) }}
|
|
</div>
|
|
</label>
|
|
|
|
<label class="form__label">
|
|
<div class="form__label__text">Class</div>
|
|
<div class="form__label__input">
|
|
{{ input_text('action[class]', '', edit_action is defined ? edit_action.action_class : '', 'text', '', true, {'maxlength':20}) }}
|
|
</div>
|
|
</label>
|
|
|
|
<h2 class="container__subtitle">Colour</h2>
|
|
|
|
<label class="form__label">
|
|
<div class="form__label__text">Inherit Colour</div>
|
|
<div class="form__label__input">
|
|
{{ input_checkbox('action[colour][inherit]', '', edit_action is defined and edit_action.action_colour|colour_get_inherit) }}
|
|
</div>
|
|
</label>
|
|
|
|
<label class="form__label">
|
|
<div class="form__label__text">Red</div>
|
|
<div class="form__label__input">
|
|
<input class="input input--number" type="number" value="{{ edit_action is defined ? edit_action.action_colour|colour_get_red : '0' }}" min="0" max="255" name="action[colour][red]">
|
|
</div>
|
|
</label>
|
|
|
|
<label class="form__label">
|
|
<div class="form__label__text">Green</div>
|
|
<div class="form__label__input">
|
|
<input class="input input--number" type="number" value="{{ edit_action is defined ? edit_action.action_colour|colour_get_green : '0' }}" min="0" max="255" name="action[colour][green]">
|
|
</div>
|
|
</label>
|
|
|
|
<label class="form__label">
|
|
<div class="form__label__text">Blue</div>
|
|
<div class="form__label__input">
|
|
<input class="input input--number" type="number" value="{{ edit_action is defined ? edit_action.action_colour|colour_get_blue : '0' }}" min="0" max="255" name="action[colour][blue]">
|
|
</div>
|
|
</label>
|
|
|
|
<div>
|
|
<button class="input__button">Save</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|