<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<body layout:fragment="modal(modalId, modalHeader, modalButtons, modalTopClose)">
    <div th:id="${modalId}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button th:unless="${modalTopClose} == false" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" th:id="${modalId} + '-label'" th:text="${modalHeader}">Modal title</h4>
                </div>
                <div class="modal-body">
                    <div layout:fragment="modal-content">
                        <p>My modal content</p>
                    </div>
                </div>
                <div class="modal-footer" th:if="${modalButtons}">
                    <button th:unless="${hideCancel} == false" type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal">Ok</button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>