Skip to content

Commit a41db16

Browse files
ycerutojaviereguiluz
authored andcommitted
using short name and statements
1 parent 0a8299f commit a41db16

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

app/Resources/views/admin/blog/_form.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{{ form_start(form, { attr: { novalidate: 'novalidate' } }) }}
77
#}
88

9-
{% if show_confirmation_message is defined and show_confirmation_message == true %}
9+
{% if show_confirmation|default(false) %}
1010
{% set attr = {'data-confirmation-message': 'action.delete_post_confirmation'|trans} %}
1111
{% endif %}
1212

@@ -16,7 +16,7 @@
1616
<input type="submit" value="{{ button_label|default('label.create_post'|trans) }}"
1717
class="{{ button_css|default("btn btn-primary") }}" />
1818

19-
{% if include_back_to_home_link is not defined or include_back_to_home_link == true %}
19+
{% if include_back_to_home_link|default(false) %}
2020
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
2121
{{ 'action.back_to_list'|trans }}
2222
</a>

app/Resources/views/admin/blog/edit.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
{{ include('admin/blog/_form.html.twig', {
1111
form: edit_form,
1212
button_label: 'action.save'|trans,
13+
include_back_to_home_link: true,
1314
}, with_context = false) }}
1415
{% endblock %}
1516

@@ -19,8 +20,7 @@
1920
form: delete_form,
2021
button_label: 'action.delete_post'|trans,
2122
button_css: 'btn btn-lg btn-block btn-danger',
22-
include_back_to_home_link: false,
23-
show_confirmation_message: true,
23+
show_confirmation: true,
2424
}, with_context = false) }}
2525
</div>
2626

app/Resources/views/admin/blog/new.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{% block main %}
66
<h1>{{ 'title.post_new'|trans }}</h1>
77

8-
{{ include('admin/blog/_form.html.twig') }}
8+
{{ include('admin/blog/_form.html.twig', {
9+
include_back_to_home_link: true,
10+
}) }}
911
{% endblock %}
1012

1113
{% block sidebar %}

app/Resources/views/admin/blog/show.html.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
form: delete_form,
4040
button_label: 'action.delete_post'|trans,
4141
button_css: 'btn btn-lg btn-block btn-danger',
42-
include_back_to_home_link: false,
43-
show_confirmation_message: true,
42+
show_confirmation: true,
4443
}, with_context = false) }}
4544
</div>
4645

0 commit comments

Comments
 (0)