|
@@ -6,7 +6,7 @@
|
|
|
{{ "form_not_available"|trans({}, "SonataAdminBundle") }}
|
|
|
</div>
|
|
|
{% else %}
|
|
|
- <form action="{{ admin.generateUrl(url, {'id': admin.id(object), 'uniqid': admin.uniqid}) }}" {{ form_enctype(form) }} method="POST">
|
|
|
+ <form class="form-horizontal" action="{{ admin.generateUrl(url, {'id': admin.id(object), 'uniqid': admin.uniqid, 'subclass': app.request.get('subclass')}) }}" {{ form_enctype(form) }} method="POST">
|
|
|
|
|
|
{% if form.vars.errors|length > 0 %}
|
|
|
<div class="sonata-ba-form-error">
|
|
@@ -41,33 +41,33 @@
|
|
|
{{ form_rest(form) }}
|
|
|
|
|
|
{% block formactions %}
|
|
|
- <div class="actions">
|
|
|
- {% if app.request.isxmlhttprequest %}
|
|
|
- {% if admin.id(object) %}
|
|
|
- <input type="submit" class="btn primary" name="btn_update" value="{% trans from 'SonataAdminBundle' %}btn_update{% endtrans %}"/>
|
|
|
+ <div class="form-actions">
|
|
|
+ {% if app.request.isxmlhttprequest %}
|
|
|
+ {% if admin.id(object) %}
|
|
|
+ <input type="submit" class="btn btn-primary" name="btn_update" value="{% trans from 'SonataAdminBundle' %}btn_update{% endtrans %}"/>
|
|
|
+ {% else %}
|
|
|
+ <input type="submit" class="btn" name="btn_create" value="{% trans from 'SonataAdminBundle' %}btn_create{% endtrans %}"/>
|
|
|
+ {% endif %}
|
|
|
{% else %}
|
|
|
- <input type="submit" class="btn" name="btn_create" value="{% trans from 'SonataAdminBundle' %}btn_create{% endtrans %}"/>
|
|
|
- {% endif %}
|
|
|
- {% else %}
|
|
|
- {% if admin.supportsPreviewMode %}
|
|
|
- <input class="btn btn-info persist-preview" name="btn_preview" type="submit" value="{% trans from 'SonataAdminBundle' %}btn_preview{% endtrans %}"/>
|
|
|
- {% endif %}
|
|
|
- {% if admin.id(object) %}
|
|
|
- <input type="submit" class="btn primary" name="btn_update_and_edit" value="{% trans from 'SonataAdminBundle' %}btn_update_and_edit_again{% endtrans %}"/>
|
|
|
- <input type="submit" class="btn" name="btn_update_and_list" value="{% trans from 'SonataAdminBundle' %}btn_update_and_return_to_list{% endtrans %}"/>
|
|
|
+ {% if admin.supportsPreviewMode %}
|
|
|
+ <input class="btn btn-info persist-preview" name="btn_preview" type="submit" value="{% trans from 'SonataAdminBundle' %}btn_preview{% endtrans %}"/>
|
|
|
+ {% endif %}
|
|
|
+ {% if admin.id(object) %}
|
|
|
+ <input type="submit" class="btn btn-primary" name="btn_update_and_edit" value="{% trans from 'SonataAdminBundle' %}btn_update_and_edit_again{% endtrans %}"/>
|
|
|
+ <input type="submit" class="btn" name="btn_update_and_list" value="{% trans from 'SonataAdminBundle' %}btn_update_and_return_to_list{% endtrans %}"/>
|
|
|
|
|
|
- {% if admin.hasroute('delete') and admin.isGranted('DELETE', object) %}
|
|
|
- {% trans from 'SonataAdminBundle' %}delete_or{% endtrans %}
|
|
|
- <a class="btn danger" href="{{ admin.generateObjectUrl('delete', object) }}">{% trans from 'SonataAdminBundle' %}link_delete{% endtrans %}</a>
|
|
|
+ {% if admin.hasroute('delete') and admin.isGranted('DELETE', object) %}
|
|
|
+ {% trans from 'SonataAdminBundle' %}delete_or{% endtrans %}
|
|
|
+ <a class="btn btn-danger" href="{{ admin.generateObjectUrl('delete', object) }}">{% trans from 'SonataAdminBundle' %}link_delete{% endtrans %}</a>
|
|
|
+ {% endif %}
|
|
|
+ {% else %}
|
|
|
+ <input class="btn btn-primary" type="submit" name="btn_create_and_edit" value="{% trans from 'SonataAdminBundle' %}btn_create_and_edit_again{% endtrans %}"/>
|
|
|
+ <input class="btn" type="submit" name="btn_create_and_create" value="{% trans from 'SonataAdminBundle' %}btn_create_and_create_a_new_one{% endtrans %}"/>
|
|
|
{% endif %}
|
|
|
- {% else %}
|
|
|
- <input class="btn primary" type="submit" name="btn_create_and_edit" value="{% trans from 'SonataAdminBundle' %}btn_create_and_edit_again{% endtrans %}"/>
|
|
|
- <input class="btn" type="submit" name="btn_create_and_create" value="{% trans from 'SonataAdminBundle' %}btn_create_and_create_a_new_one{% endtrans %}"/>
|
|
|
{% endif %}
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
{% endblock formactions %}
|
|
|
</form>
|
|
|
{% endif%}
|
|
|
-
|
|
|
-{% endblock %}
|
|
|
+
|
|
|
+{% endblock %}
|