Skip to content

Commit 9099b93

Browse files
committed
fix layoutblock html and javascript
1 parent 6355d86 commit 9099b93

2 files changed

Lines changed: 5 additions & 22 deletions

File tree

Resources/views/PageAdmin/layout_block_edit.html.twig

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,11 @@
2626
{% block sonata_pre_fieldsets %}{% endblock %}
2727

2828
{% for name, form_group in admin.formgroups %}
29-
<fieldset {% if form_group.collapsed %}class="sonata-ba-fieldset-collapsed"{% endif %}>
30-
{% if admin.formgroups|length > 1 and name != admin.label %}
31-
<legend{% if form_group.description != false %} class="sonata-ba-fieldset-collapsed-description"{% endif %}>
32-
{% if form_group.collapsed %}
33-
<a class="sonata-ba-collapsed" data-toggle="collapse"
34-
data-target="#{{ admin.uniqid }}_{{ loop.index }}"
35-
title="{{ 'link_expand'|trans({}, 'SonataAdminBundle') }}">{{ name|trans({}, admin.translationDomain) }}</a>
36-
{% else %}
37-
{{ name|trans({}, admin.translationDomain) }}
38-
{% endif %}
39-
</legend>
29+
{% for field_name in form_group.fields %}
30+
{% if admin.formfielddescriptions[field_name] is defined %}
31+
{{ form_widget(form[field_name]) }}
4032
{% endif %}
41-
42-
<div class="{% if form_group.collapsed %}sonata-ba-collapsed-fields collapse{% endif %}"
43-
id="{{ admin.uniqid }}_{{ loop.index }}">
44-
45-
{% for field_name in form_group.fields %}
46-
{% if admin.formfielddescriptions[field_name] is defined %}
47-
{{ form_widget(form[field_name]) }}
48-
{% endif %}
49-
{% endfor %}
50-
</div>
51-
</fieldset>
33+
{% endfor %}
5234
{% endfor %}
5335

5436
{% block sonata_post_fieldsets %}{% endblock %}

Resources/views/PageAdmin/page_edit_layout_blocks_script.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ function submitLayoutCreate(event) {
143143
},
144144
error: function (xhr, textStatus, errorThrown) {
145145
jQuery('#layoutBlockModal').html(xhr.responseText);
146+
jQuery('.modal').trigger('show');
146147
jQuery('form', '#layoutBlockModal').bind('submit', submitLayoutCreate);
147148
}
148149
});

0 commit comments

Comments
 (0)