Skip to content

Instantly share code, notes, and snippets.

@webmozart
Created October 14, 2015 16:03
Show Gist options
  • Save webmozart/767ddcfec78d8d4d5825 to your computer and use it in GitHub Desktop.
Save webmozart/767ddcfec78d8d4d5825 to your computer and use it in GitHub Desktop.
{% extends '::base.html.twig' %}
{% set active_section = 'goods' %}
{% use 'bootstrap_3_layout.html.twig' %}
{% block body -%}
<div class="page-header">
<h1>Edit Good</h1>
</div>
{% form_theme edit_form _self %}
{{ form(edit_form) }}
<ul class="record_actions list-inline">
<li><a href="{{ path('goods') }}" class="btn btn-default"><span class="glyphicon glyphicon-list"></span> Back to the list</a></li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}
{% block text_widget %}
{% if not valid %}
{% set attr = attr|merge({
'style': 'border: 1px solid orange'
}) %}
{% endif %}
{{ form_widget(form, {'attr': attr}) }}
{% endblock %}
{% block _dso_good_submit_widget %}
{% set label = '[OK] Submit me' %}
{{ form_widget(form, {'label': label}) }}
{% endblock %}
{% block form_label %}
{% if label is empty -%}
{% set label = name|humanize %}
{%- endif -%}
{% if required %}
{% set label = label ~ '*' %}
{% endif %}
{{ parent() }}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment