123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- {#
- This file is part of the Sonata package.
- (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- For the full copyright and license information, please view the LICENSE
- file that was distributed with this source code.
- #}
- {% block title %}
- {% if object.id %}
- <h1>Edit</h1>
- {% else %}
- <h1>Create</h1>
- {% endif %}
- {% endblock %}
- {% block actions %}
- <div>
- <ul>
- <li><a href="{{ url(urls.create.url) }}">{% trans "link_action_create" from "BaseApplicationBundle" %}</a></li>
- <li><a href="{{ url(urls.list.url) }}">{% trans "link_action_list" from "BaseApplicationBundle" %}</a></li>
- </ul>
- </div>
- {% endblock %}
- {% block form %}
- <form action="{{ url(urls.update.url, {'id': object.id}) }}" method="POST">
- {{ form|render_hidden }}
- {% for field in fields %}
- {{ field|render_form_element(form, object, {'urls' : urls}) }}
- {% endfor %}
- {% if object.id %}
- <input type="submit" value="{% trans "btn_update" from "BaseApplicationBundle" %}"/>
- {% else %}
- <input type="submit" value="{% trans "btn_create" from "BaseApplicationBundle" %}"/>
- {% endif %}
- </form>
- {% endblock %}
|