Skip to content

Instantly share code, notes, and snippets.

@lenybernard
Created July 22, 2013 10:17
Show Gist options
  • Select an option

  • Save lenybernard/6052819 to your computer and use it in GitHub Desktop.

Select an option

Save lenybernard/6052819 to your computer and use it in GitHub Desktop.
#newBill.html.twig
{% extends app.request.isXmlHttpRequest ? '::ajaxLayout.html.twig' : '::frontLayout.html.twig' %}
{% block content %}
<h1>{{ "bill.new.title"|trans }}</h1>
<form action="{{ path('bill_create') }}" method="post" {{ form_enctype(form) }}>
{% include 'AppBundle:Bill:form.html.twig' with {'form':form} %}
<p>
<input type="submit" value="{{ "bill.edit.action.delete"|trans|desc("Supprimer") }}" />
</p>
</form>
{% endblock %}
{% block modal_header %}
<h3>{{ "bill.new.title"|trans }}</h3>
{% endblock modal_header %}
{% block modal_content %}
<form action="{{ path('bill_create') }}" method="post" {{ form_enctype(form) }}>
{% include 'AppBundle:Bill:form.html.twig' with {'form':form} %}
<p>
<input type="submit" value="{{ "bill.edit.action.delete"|trans|desc("Supprimer") }}" />
</p>
</form>
{% endblock %}
#ajaxLayout.html.twig
<div class="modal-header">
<a class="close" data-dismiss="modal">&times;</a>
{% block modal_header %}
{% endblock modal_header %}
</div>
{% block body %}
<div class="modal-body">
{% block modal_content %}
{% endblock modal_content %}
</div>
{% endblock body %}
<div class="modal-footer">
{% block modal_footer %}
{% endblock modal_footer %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment