mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 07:19:49 +00:00
fix admin form for news item
This commit is contained in:
parent
4646cd1cf0
commit
01a5c291e0
@ -29,17 +29,19 @@ class NewsItemType extends AbstractType
|
||||
'required' => true,
|
||||
])
|
||||
->add('content', ChillTextareaType::class, [
|
||||
'required' => true,
|
||||
'required' => false,
|
||||
])
|
||||
->add(
|
||||
'startDate',
|
||||
ChillDateType::class,
|
||||
[
|
||||
'required' => true,
|
||||
'input' => 'datetime_immutable'
|
||||
]
|
||||
)
|
||||
->add('endDate', ChillDateType::class, [
|
||||
'required' => false,
|
||||
'input' => 'datetime_immutable'
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -11,12 +11,16 @@
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.title }}</td>
|
||||
<td>{{ entity.startDate }}</td>
|
||||
<td>{{ entity.endDate }}</td>
|
||||
<td>{{ entity.startDate|date }}</td>
|
||||
{% if entity.endDate is not null %}
|
||||
<td>{{ entity.endDate|date }}</td>
|
||||
{% else %}
|
||||
<td>Pas de date de fin</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_main_news_item_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
|
||||
<a href="{{ path('chill_crud_news_item_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user