Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[AdminListBundle] Fix the save button in adminlists, it was placed outside the <form> tag #344

Merged
merged 1 commit into from
Apr 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,35 @@
{% form_theme form 'KunstmaanAdminBundle:Form:fields.html.twig' %}

{% block extra_actions_header %}
<div class="col-sm-6 col-md-4">
<!-- Main-actions -->
<div class="js-auto-collapse-buttons page-main-actions page-main-actions--no-tabs page-main-actions--inside-extra-actions-header">
<div class="btn-group">
{% block actions %}
<button type="submit" class="btn btn-primary btn--raise-on-hover">
{{ 'Save' | trans }}
</button>
<a href="{{ path(adminlistconfigurator.getIndexUrl()["path"], adminlistconfigurator.getIndexUrl()["params"]) }}" class="btn btn-default btn--raise-on-hover">
{{ 'form.cancel' | trans }}
</a>
<form action="{{ path(app.request.attributes.get('_route'), my_router_params()) }}" method="post" {{ form_enctype(form) }} novalidate="novalidate">
<div class="col-sm-6 col-md-4">
<!-- Main-actions -->
<div class="js-auto-collapse-buttons page-main-actions page-main-actions--no-tabs page-main-actions--inside-extra-actions-header">
<div class="btn-group">
{% block actions %}
<button type="submit" class="btn btn-primary btn--raise-on-hover">
{{ 'Save' | trans }}
</button>
<a href="{{ path(adminlistconfigurator.getIndexUrl()["path"], adminlistconfigurator.getIndexUrl()["params"]) }}" class="btn btn-default btn--raise-on-hover">
{{ 'form.cancel' | trans }}
</a>

{% if adminlistconfigurator.hasItemActions() %}
{% for itemAction in adminlistconfigurator.getItemActions() %}
<a class="btn btn-default btn--raise-on-hover" href="{{ path(itemAction.getUrlFor(entity)["path"], itemAction.getUrlFor(entity)[("params")] ) }}">
{% if itemAction.getIconFor(entity) is not null %}
<img src="{{ asset(itemAction.getIconFor(entity)) }}" alt="{{ itemAction.getLabelFor(entity) }}">
{% else %}
{{ itemAction.getLabelFor(entity) }}
{% endif %}
</a>
{% endfor %}
{% endif %}
{% endblock %}
{% if adminlistconfigurator.hasItemActions() %}
{% for itemAction in adminlistconfigurator.getItemActions() %}
<a class="btn btn-default btn--raise-on-hover" href="{{ path(itemAction.getUrlFor(entity)["path"], itemAction.getUrlFor(entity)[("params")] ) }}">
{% if itemAction.getIconFor(entity) is not null %}
<img src="{{ asset(itemAction.getIconFor(entity)) }}" alt="{{ itemAction.getLabelFor(entity) }}">
{% else %}
{{ itemAction.getLabelFor(entity) }}
{% endif %}
</a>
{% endfor %}
{% endif %}
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}

{% block content %}
<form action="{{ path(app.request.attributes.get('_route'), my_router_params()) }}" method="post" {{ form_enctype(form) }} novalidate="novalidate">
<!-- Scroll-actions -->
<div class="page-main-actions page-main-actions--top" id="page-main-actions-top">
<div class="btn-group">
Expand All @@ -42,7 +40,9 @@
</button>
</div>
</div>
{% endblock %}

{% block content %}
<!-- Fields -->
<fieldset class="form__fieldset--padded">
{% block form_content %}
Expand Down