38 lines
1.1 KiB
Twig
38 lines
1.1 KiB
Twig
{# Creating and editing an access code. See admin/_modal_resource.html.twig for how it closes. #}
|
|
{% extends 'htmx_modal.html.twig' %}
|
|
|
|
{% block title %}
|
|
{%- if code.id -%}
|
|
{{ code.label }} bearbeiten
|
|
{%- else -%}
|
|
Code hinzufügen
|
|
{%- endif -%}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ form_start(form, { attr: {
|
|
'hx-post': form.vars.action,
|
|
'hx-target': '#htmx-modal',
|
|
'hx-swap': 'outerHTML',
|
|
} }) }}
|
|
{{ form_errors(form) }}
|
|
|
|
<div class="space-y-4">
|
|
{{ form_row(form.label) }}
|
|
{{ form_row(form.description) }}
|
|
{{ form_row(form.code) }}
|
|
{{ form_row(form.validFrom) }}
|
|
{{ form_row(form.visibility) }}
|
|
</div>
|
|
|
|
<div class="flex justify-end gap-2 pt-6">
|
|
<button type="button" class="button button--neutral" {{ stimulus_action('modal', 'close') }}>
|
|
Abbrechen
|
|
</button>
|
|
<button type="submit" class="button button--primary">
|
|
Speichern
|
|
</button>
|
|
</div>
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|