<!--
 ~ Copyright 2022 youngmonkeys.org
 ~ 
 ~ Licensed under the ezyplatform, Version 1.0.0 (the "License");
 ~ you may not use this file except in compliance with the License.
 ~ You may obtain a copy of the License at
 ~ 
 ~     https://youngmonkeys.org/licenses/ezyplatform-1.0.0.txt
 ~ 
 ~ Unless required by applicable law or agreed to in writing, software
 ~ distributed under the License is distributed on an "AS IS" BASIS,
 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ~ See the License for the specific language governing permissions and
 ~ limitations under the License.
-->

<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">
<body>
<th:block th:fragment="content">
    <div class="modal fade pt-4rem" role="dialog" th:id="${id}">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">[[#{${title}}]]</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <span th:id="${id + '-body-content'}">[[${body}]]</span>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn"
                            th:classappend="${(id.startsWith('delete') || type == 'delete') ? 'btn-danger' : 'btn-primary'}"
                            th:attr="onclick=|ezyadmin.onPromptConfirmed('${id}')|">
                        [[#{${confirmButton}}]]
                    </button>
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">
                        [[#{${closeButton}}]]
                    </button>
                </div>
            </div>
        </div>
    </div>
</th:block>
</body>
</html>
