{% extends "SsoBackendBundle:token:base.html.twig" %}

{% block title %}Edit User{% endblock %}
{% block body %}
    <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h2>Do you really want to delete this user?</h2>
                </div>
                <div class="modal-body">
                    <p>You are about to delete one token, this procedure is irreversible.</p>
                    <p>Do you want to proceed?</p>
                    <p>We hope that you know what you do!</a>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                    <a href="#" class="btn btn-danger danger">Delete</a>
                </div>
            </div>
        </div>
    </div>
    <h1>Edit Object Values Language</h1>
    <div class="well clearfix">
        {{ form(edit_form) }}
        <ul class="record_actions">
            <li>
                <a class="btn btn-success" href="{{ path('_admin_backend_webservice_object_language') }}">
                    Back to the list
                </a>
            </li>
            <li><a class="btn btn-danger" data-toggle="modal" data-target="#confirm-delete"
                   data-href="{{ path('_admin_backend_webservice_object_language_delete', { 'languageCode': entity.code}) }}"
                   href="#">Delete Language</a></li>
        </ul>
    </div>
    <script>
        $('#confirm-delete').on('show.bs.modal', function (e) {
            $(this).find('.danger').attr('href', $(e.relatedTarget).data('href'));
//$('.debug-url').html('Delete URL: <strong>' + $(this).find('.danger').attr('href') + '</strong>');
        });
    </script>
{% endblock %}