collection-crud/templates/gpu/edit.html.twig

31 lines
790 B
Twig

{% extends 'form.html.twig' %}
{% block title %}Edit Gpu{% endblock %}
{% block form %}
<h2>Edit Graphics Card</h2>
<div class="small callout">
<ul>
<li>
<a href="{{ path('gpu_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('gpu_delete', {'id': gpu.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ gpu.id) }}">
<button type="submit" class="alert button expanded">Delete</button>
</form>
</div>
{% endblock %}