{% extends "SsoDemoBundle:User:base.html.twig" %}

{% block title %}{{ parent() }} - Add{% endblock %}

{% block body %}
    <h1>User - Add</h1>
    {% include 'SsoDemoBundle:Layout:form.html.twig' %}
    {% include 'SsoDemoBundle:User/javascripts:add.html.twig' %}
    <h3>Help</h3>

    <div class="panel-group" id="accordion">

        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseUserAddRequest">
                        Request Example
                    </a>
                </h4>
            </div>
            <div id="collapseUserAddRequest" class="panel-collapse collapse">
                <div class="panel-body">

                    <h3>Request Example:</h3>
                    {% include 'SsoHelpBundle:User:xml/add.html.twig' %}

                </div>
            </div>
        </div>

        <br/>

        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseUserAddResponse">
                        Response Success Example
                    </a>
                </h4>
            </div>
            <div id="collapseUserAddResponse" class="panel-collapse collapse">
                <div class="panel-body">

                    <h3>Response Success Example:</h3>
                    {% include 'SsoHelpBundle:User:xml/response/add.html.twig' %}

                </div>
            </div>
        </div>

    </div>
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script>
        $('.dynamic-collection').collection({
            'add': '<a href="#" class="btn btn-default"><span class="glyphicon glyphicon-plus-sign"></a>',
            'remove': '<a href="#" class="btn btn-default"><span class="glyphicon glyphicon-minus-sign"></a>',
            'allow_up': false,
            'allow_down': false,
            'allow_duplicate': false,
            'init_with_n_elements': 1
        });
    </script>
{% endblock %}
