mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
some improvement to the Update / create event pages
- i18n of all the form - add a title to each page - chill layout of each page - add flash message on successfully creation and update action For the update page, (see #23), the user is not allowed to update the center close #23 close #2
This commit is contained in:
@@ -1,16 +1,30 @@
|
||||
{% extends 'ChillEventBundle::layout.html.twig' %}
|
||||
|
||||
{% block title 'Event edit'|trans %}
|
||||
|
||||
{% block event_content -%}
|
||||
<h1>Event edit</h1>
|
||||
<h1>{{ 'Event edit'|trans }}</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_errors(edit_form) }}
|
||||
{{ form_row(edit_form.circle) }}
|
||||
{% if edit_form.center is defined %}
|
||||
{{ form_row(edit_form.center) }}
|
||||
{% endif %}
|
||||
{{ form_row(edit_form.label) }}
|
||||
{{ form_row(edit_form.date) }}
|
||||
{{ form_row(edit_form.type, { 'label': 'Event type' }) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_list_most_recent') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_list_most_recent') }}" class="sc-button bt-cancel">
|
||||
{{ 'Back to the most recent events'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(edit_form.submit, { 'attr' : { 'class' : 'sc-button bt-update' } }) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(edit_form) }}
|
||||
{% endblock %}
|
||||
|
@@ -1,15 +1,28 @@
|
||||
{% extends 'ChillEventBundle::layout.html.twig' %}
|
||||
|
||||
{% block title 'Event creation'|trans %}
|
||||
|
||||
{% block event_content -%}
|
||||
<h1>Event creation</h1>
|
||||
<h1>{{ 'Event creation'|trans }}</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
{{ form_start(form) }}
|
||||
{{ form_errors(form) }}
|
||||
{{ form_row(form.circle) }}
|
||||
{{ form_row(form.center) }}
|
||||
{{ form_row(form.label) }}
|
||||
{{ form_row(form.date) }}
|
||||
{{ form_row(form.type, { 'label': 'Event type' }) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_list_most_recent') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_list_most_recent') }}" class="sc-button bt-cancel">
|
||||
{{ 'Back to the most recent events'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-create' } }) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event__event_edit', { 'id': event.id }) }}" class="sc-button btn-edit">
|
||||
<a href="{{ path('chill_event__event_edit', { 'event_id': event.id }) }}" class="sc-button btn-edit">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user