mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
39 lines
1.5 KiB
Twig
39 lines
1.5 KiB
Twig
{% extends "theme::layouts/default" %}
|
|
{% block content %}
|
|
{% include "theme::partials/messages" %}
|
|
|
|
<div class="container-fluid">
|
|
<div class="card">
|
|
<div class="card-block">
|
|
|
|
{% set actions = ['save'] %}
|
|
|
|
{% if id is not null %}
|
|
{% set actions = ['update'] %}
|
|
{% endif %}
|
|
|
|
{% set form = form('cats','category').entry(id).actions(actions).get() %}
|
|
{{ form_open({
|
|
'class': 'form ' ~ form.options.class ,
|
|
'enctype': 'multipart/form-data',
|
|
})|raw }}
|
|
<fieldset>
|
|
<div class="section">
|
|
{{ nameField|raw }}
|
|
{{ form.fields.slug|raw }}
|
|
<input type="hidden" name="parent_category"
|
|
value="{% if form.fields.parent_category.value.id is defined %}{{ form.fields.parent_category.value.id }}{% elseif app.request.get('parent') is defined %}{{ app.request.get('parent') }}{% endif %}">
|
|
{{ form.fields.order|raw }}
|
|
{{ form.fields.files|raw }}
|
|
</div><!-- section -->
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<div class="controls card">
|
|
<div class="card-block">
|
|
{{ form.actions|raw }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ asset_add("scripts.js", "visiosoft.module.cats::js/admin-cat.js") }}
|
|
{% endblock %} |