Snippets

Krzysztof Ożóg y6GRy: Untitled snippet

Created by Krzysztof Ożóg last modified
{% extends '::base.html.twig' %}

{% block body -%}
    <h1>Event edit</h1>

    <form action="{{ path('event_update', {'id': event.id}) }}" method="post">
        {{ form_row(form.name) }}
        {{ form_row(form.description) }}
        {{ form_row(form.address) }}
        {{ form_row(form.startsAt) }}
        {{ form_row(form.endsAt) }}
        {{ form_row(form.participantLimit) }}
        {{ form_rest(form) }}
        <button type="submit">Edit event</button>
    </form>

        <ul class="record_actions">
    <li>
        <a href="{{ path('event') }}">
            Back to the list
        </a>
    </li>
    <li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}
{% extends '::base.html.twig' %}

{% block body -%}
    <h1>Event creation</h1>

    {{ form(form) }}
    <form action="{{ path('event_create') }}" method="post">
        {{ form_row(form.name) }}
        {{ form_row(form.description) }}
        {{ form_row(form.address) }}
        {{ form_row(form.startsAt) }}
        {{ form_row(form.endsAt) }}
        {{ form_row(form.participantLimit) }}
        {{ form_rest(form) }}
        <button type="submit">Create event</button>
    </form>

    <ul class="record_actions">
        <li>
            <a href="{{ path('event') }}">
                Back to the list
            </a>
        </li>
    </ul>
{% endblock %}
{% block body -%}
    <h1>Event</h1>

    <table class="record_properties">
        <tbody>
            <tr>
                <th>Id</th>
                <td>{{ event.id }}</td>
            </tr>
            <tr>
                <th>Name</th>
                <td>{{ event.name }}</td>
            </tr>
            <tr>
                <th>Description</th>
                <td>{{ event.description }}</td>
            </tr>
            <tr>
                <th>Startsat</th>
                <td>{{ event.startsAt|date('Y-m-d H:i:s') }}</td>
            </tr>
            <tr>
                <th>Endsat</th>
                <td>{{ event.endsAt|date('Y-m-d H:i:s') }}</td>
            </tr>
            <tr>
                <th>Participantlimit</th>
                <td>{{ event.participantLimit }}</td>
            </tr>
            <tr>
                <th>Address</th>
                <td>{{ event.address }}</td>
            </tr>
            <tr>
                <th>Createdat</th>
                <td>{{ event.createdAt|date('Y-m-d H:i:s') }}</td>
            </tr>
            <tr>
                <th>Updatedat</th>
                <td>{{ event.updatedAt|date('Y-m-d H:i:s') }}</td>
            </tr>
        </tbody>
    </table>

        <ul class="record_actions">
    <li>
        <a href="{{ path('event') }}">
            Back to the list
        </a>
    </li>
    <li>
        <a href="{{ path('event_edit', { 'id': event.id }) }}">
            Edit
        </a>
    </li>
    <li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.