<commit_before>{%- extends "layout.html.twig" -%}

{%- form_theme form 'bootstrap_3_horizontal_layout.html.twig' -%}

{% block content -%}
    <h1>Update Recipe</h1>
    {{ form_start(form, {"attr": {"novalidate": "novalidate"}}) }}
    <!-- TODO debug -->
        {{ form_row(form.title) }}

        {{ form_label(form.ingredients) }}
        <div class="">
            <a href="#" id="add_ingredient_link"><i class="glyphicon glyphicon-plus-sign"></i></a>
        </div>
        <div id="recipe_ingredients"  class="col-md-10" data-prototype="
             {% filter escape %}
                 {{ include('Utils/ingredients_form.html.twig', { 'form': form.ingredients.vars.prototype }) }}
             {% endfilter %}">
             {% for ingredient in form.ingredients %}
                 {{ include('Utils/ingredients_form.html.twig', { 'form': ingredient }) }}
             {% endfor %}
        </div>

        {{ form_row(form.category) }}
        {{ form_row(form.duration) }}

        {{ form_label(form.steps) }}
        <div class="">
            <a href="#" id="add_step_link"><i class="glyphicon glyphicon-plus-sign"></i></a>
        </div>
        <div id="recipe_steps"  class="col-md-10" data-prototype="
             {% filter escape %}
                 {{ include('Utils/steps_form.html.twig', { 'form': form.steps.vars.prototype }) }}
             {% endfilter %}">
             {% for step in form.steps %}
                 {{ include('Utils/steps_form.html.twig', { 'form': step }) }}
             {% endfor %}
        </div>


        {{ form_row(form.isFinished) }}
        {{ form_row(form.title) }}


        {{ form_widget(form) }}
        <div class="form-group">
            <a href="{{ path('recipe_list') }}" class="btn btn-md btn-info
            {% if delete_form is defined %}col-md-offset-1{% else %}col-md-offset-2{% endif %} col-md-2">
                <i class="glyphicon glyphicon-arrow-left"></i> Back to the list
            </a>
            <input type="submit" value="Create" class="btn btn-success btn-md col-md-offset-1 col-md-2" />
            <input type="Reset" value="Reset" class="btn btn-warning btn-md col-md-offset-1 col-md-2" />
            {#% if delete_form is defined %}
                <div class="col-md-2 col-md-offset-1">
                    {{ form_start(delete_form) }}
                        <input type="submit" value="Delete" class="col-md-12 btn btn-danger btn-md">
                    {{ form_end(delete_form) }}
                </div>
            {% endif %#}
        </div>
    {{ form_end(form) }}



{%- endblock %}

{% block javascripts -%}
  {{ parent() }}
  <script>
  $(function(){<commit_msg>Updates the name of update button<commit_after>{%- extends "layout.html.twig" -%}

{%- form_theme form 'bootstrap_3_horizontal_layout.html.twig' -%}

{% block content -%}
    <h1>Update Recipe</h1>
    {{ form_start(form, {"attr": {"novalidate": "novalidate"}}) }}
    <!-- TODO debug -->
        {{ form_row(form.title) }}

        {{ form_label(form.ingredients) }}
        <div class="">
            <a href="#" id="add_ingredient_link"><i class="glyphicon glyphicon-plus-sign"></i></a>
        </div>
        <div id="recipe_ingredients"  class="col-md-10" data-prototype="
             {% filter escape %}
                 {{ include('Utils/ingredients_form.html.twig', { 'form': form.ingredients.vars.prototype }) }}
             {% endfilter %}">
             {% for ingredient in form.ingredients %}
                 {{ include('Utils/ingredients_form.html.twig', { 'form': ingredient }) }}
             {% endfor %}
        </div>

        {{ form_row(form.category) }}
        {{ form_row(form.duration) }}

        {{ form_label(form.steps) }}
        <div class="">
            <a href="#" id="add_step_link"><i class="glyphicon glyphicon-plus-sign"></i></a>
        </div>
        <div id="recipe_steps"  class="col-md-10" data-prototype="
             {% filter escape %}
                 {{ include('Utils/steps_form.html.twig', { 'form': form.steps.vars.prototype }) }}
             {% endfilter %}">
             {% for step in form.steps %}
                 {{ include('Utils/steps_form.html.twig', { 'form': step }) }}
             {% endfor %}
        </div>


        {{ form_row(form.isFinished) }}
        {{ form_row(form.title) }}


        {{ form_widget(form) }}
        <div class="form-group">
            <a href="{{ path('recipe_list') }}" class="btn btn-md btn-info
            {% if delete_form is defined %}col-md-offset-1{% else %}col-md-offset-2{% endif %} col-md-2">
                <i class="glyphicon glyphicon-arrow-left"></i> Back to the list
            </a>
            <input type="submit" value="Update" class="btn btn-success btn-md col-md-offset-1 col-md-2" />
            <input type="Reset" value="Reset" class="btn btn-warning btn-md col-md-offset-1 col-md-2" />
            {#% if delete_form is defined %}
                <div class="col-md-2 col-md-offset-1">
                    {{ form_start(delete_form) }}
                        <input type="submit" value="Delete" class="col-md-12 btn btn-danger btn-md">
                    {{ form_end(delete_form) }}
                </div>
            {% endif %#}
        </div>
    {{ form_end(form) }}



{%- endblock %}

{% block javascripts -%}
  {{ parent() }}
  <script>
  $(function(){
{'fraction_non_alphanumeric': 0.1840926064227035, 'fraction_numerical': 0.006721433905899925, 'mean_word_length': 1.9728079911209766, 'pattern_counts': {'":': 4, '<': 65, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '523520', 'n_tokens_mistral': 1773, 'n_tokens_neox': 1636, 'n_words': 294}