31 lines
962 B
PHP
31 lines
962 B
PHP
|
{% extends 'form.html.twig' %}
|
||
|
|
||
|
{% block title %}<?= $entity_class_name ?> - Edit{% endblock %}
|
||
|
|
||
|
{% block form %}
|
||
|
<h2>Edit <?= $entity_class_name ?></h2>
|
||
|
|
||
|
<div class="small callout">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<a href="{{ path('<?= $route_name ?>_index') }}">Back to the list</a>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
|
||
|
<div class="large primary callout">
|
||
|
{{ form_start(edit_form) }}
|
||
|
{{ form_widget(edit_form) }}
|
||
|
<button
|
||
|
type="submit"
|
||
|
class="success button expanded"
|
||
|
>Update</button>
|
||
|
{{ form_end(edit_form) }}
|
||
|
|
||
|
<form method="post" action="{{ path('<?= $route_name ?>_delete', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>) }}">
|
||
|
<button type="submit" class="alert button expanded">Delete</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
{% endblock %}
|