add time to event dates

This commit is contained in:
Tchama 2019-01-15 14:10:45 +01:00
parent 97d79c5a22
commit 7836ece3ee
5 changed files with 7 additions and 11 deletions

View File

@ -2,8 +2,8 @@
namespace Chill\EventBundle\Form; namespace Chill\EventBundle\Form;
use Chill\MainBundle\Form\Type\ChillDateTimeType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Chill\EventBundle\Form\Type\PickEventType; use Chill\EventBundle\Form\Type\PickEventType;
@ -69,10 +69,8 @@ class EventType extends AbstractType
$builder $builder
->add('name') ->add('name')
->add('date', DateType::class, array( ->add('date', ChillDateTimeType::class, array(
'required' => true, 'required' => true
'widget' => 'single_text',
'format' => 'dd-MM-yyyy'
) )
) )
->add('center', EntityType::class, array( ->add('center', EntityType::class, array(

View File

@ -19,7 +19,7 @@
{% for event in events %} {% for event in events %}
<tr> <tr>
<td>{{ event.name }}</td> <td>{{ event.name }}</td>
<td>{{ event.date|localizeddate('long', 'none') }}</td> <td>{{ event.date|localizeddate('long', 'short') }}</td>
<td>{{ event.type.name|localize_translatable_string }}</td> <td>{{ event.type.name|localize_translatable_string }}</td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">

View File

@ -15,7 +15,7 @@
</tr> </tr>
<tr> <tr>
<th>{{ 'Date'|trans }}</th> <th>{{ 'Date'|trans }}</th>
<td>{{ event.date|localizeddate('long', 'none') }}</td> <td>{{ event.date|localizeddate('long', 'short') }}</td>
</tr> </tr>
<tr> <tr>
<th>{{ 'Event type'|trans }}</th> <th>{{ 'Event type'|trans }}</th>

View File

@ -13,7 +13,7 @@
</tr> </tr>
<tr> <tr>
<th>{{ 'Date'|trans }} </th> <th>{{ 'Date'|trans }} </th>
<td>{{ event.date|localizeddate('long', 'none') }}</td> <td>{{ event.date|localizeddate('long', 'short') }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -47,7 +47,6 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="sc-button bt-cancel">
<i class="fa fa-arrow-left"></i>
{{ 'Back to the event'|trans }} {{ 'Back to the event'|trans }}
</a> </a>
</li> </li>

View File

@ -17,7 +17,7 @@
</tr> </tr>
<tr> <tr>
<th>{{ 'Date'|trans }} </th> <th>{{ 'Date'|trans }} </th>
<td>{{ participation.event.date|localizeddate('long', 'none') }}</td> <td>{{ participation.event.date|localizeddate('long', 'short') }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -29,7 +29,6 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button bt-cancel"> <a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button bt-cancel">
<i class="fa fa-arrow-left"></i>
{{ 'Back to the event'|trans }} {{ 'Back to the event'|trans }}
</a> </a>
</li> </li>