{% include '::messages.html.twig' %}
<div id="{{ htmlUid }}" class="well clearfix">
    <div><strong>{{ entity.Name }}</strong></div>
    {{ form(edit_form) }}
</div>
<script>
    $(function () {
        $("#{{ htmlUid }} .modal-close").click(function () {
            $(this).closest('.modal').modal('hide');
        });
        $("#{{ htmlUid }} form").submit(function (event) {
            var me = $(this);
            event.stopPropagation();
            $.ajax({
                type: "POST",
                url: me.attr("action"),
                data: me.serialize(),
                success: function (data) {
                    $("#{{ htmlUid }}").parent().html(data);
                }
            });
            return false;
        });
    });
</script>