<commit_before><%--
    Popup confirmation dialog.

    This dialog can operate in both AJAX and non-AJAX modes. In AJAX mode a target can be re-rendered
    using the return value from the AJAX call (see g:formRemote #update).

    Parameters:
        controller  Name of the controller
        action      Name of the controller action
        id          ID value for the action

    Optional parameters:
        formParams  A map of key value parameters to pass to the action

        ajax        If true, use an AJAX remote form to call the defined controller/action/id
        update      Element to update with AJAX return value

        onYes       Javascript to execute when "Yes" is clicked
        onNo        Javascript to execute when "No" is clicked


    The rendered confirmation dialog can be shown hidden using the element ID "confirm-dialog-${action}-${name}" where the
    ID value is that of the passed ID value of the action.

    To open, use "$('#confirm-dialog-action-123'}').dialog('open');" or the shorthand "showConfirm('action-123');"
 --%>

<g:set var="name" value="${[action, id].collect{ it }.join('-')}"/>

<div id="confirm-dialog-${name}" class="bg-lightbox" title="${message(code: 'popup.confirm.title')}" style="display:none;">
    <!-- command form -->
    <g:if test="${ajax}">
        <g:formRemote name="confirm-command-form-${name}" url="[controller: controller, action: action, id: id]" update="${update}">
            <g:hiddenField name="id" value="${id}"/>
            <g:each var="param" in="${formParams?.entrySet()}">
                <g:if test="${param.value != null && param.value != 'null' }">
                    <g:hiddenField name="${param.key}" value="${param.value}"/>
                </g:if>
            </g:each>
        </g:formRemote>
    </g:if>
    <g:else>
        <g:form name="confirm-command-form-${name}" url="[controller: controller, action: action, id: id]">
            <g:hiddenField name="id" value="${id}"/>
            <g:each var="param" in="${formParams?.entrySet()}">
                <g:if test="${param.value != null && param.value != 'null' }">
                    <g:hiddenField name="${param.key}" value="${param.value}"/>
                </g:if>
            </g:each>
        </g:form>
    </g:else>

    <!-- confirm dialog content body -->
    <table style="margin: 3px 0 0 10px">
        <tbody><tr>
            <td>
                <img src="/jbilling/images/icon34.gif" alt="">
            </td>
            <td class="col2" style="padding-left: 7px">
                <g:message code="${message}" args="[id]"/>
            </td>
        </tr></tbody>
    </table>
</div>

<script type="text/javascript">
    $(function() {
        setTimeout(function() {
            $('#confirm-dialog-${name}').dialog({
                autoOpen: false,
                height: 200,
                width: 375,
                modal: true,
                buttons: {<commit_msg>Align confirmation dialog icon with top<commit_after><%--
    Popup confirmation dialog.

    This dialog can operate in both AJAX and non-AJAX modes. In AJAX mode a target can be re-rendered
    using the return value from the AJAX call (see g:formRemote #update).

    Parameters:
        controller  Name of the controller
        action      Name of the controller action
        id          ID value for the action

    Optional parameters:
        formParams  A map of key value parameters to pass to the action

        ajax        If true, use an AJAX remote form to call the defined controller/action/id
        update      Element to update with AJAX return value

        onYes       Javascript to execute when "Yes" is clicked
        onNo        Javascript to execute when "No" is clicked


    The rendered confirmation dialog can be shown hidden using the element ID "confirm-dialog-${action}-${name}" where the
    ID value is that of the passed ID value of the action.

    To open, use "$('#confirm-dialog-action-123'}').dialog('open');" or the shorthand "showConfirm('action-123');"
 --%>

<g:set var="name" value="${[action, id].collect{ it }.join('-')}"/>

<div id="confirm-dialog-${name}" class="bg-lightbox" title="${message(code: 'popup.confirm.title')}" style="display:none;">
    <!-- command form -->
    <g:if test="${ajax}">
        <g:formRemote name="confirm-command-form-${name}" url="[controller: controller, action: action, id: id]" update="${update}">
            <g:hiddenField name="id" value="${id}"/>
            <g:each var="param" in="${formParams?.entrySet()}">
                <g:if test="${param.value != null && param.value != 'null' }">
                    <g:hiddenField name="${param.key}" value="${param.value}"/>
                </g:if>
            </g:each>
        </g:formRemote>
    </g:if>
    <g:else>
        <g:form name="confirm-command-form-${name}" url="[controller: controller, action: action, id: id]">
            <g:hiddenField name="id" value="${id}"/>
            <g:each var="param" in="${formParams?.entrySet()}">
                <g:if test="${param.value != null && param.value != 'null' }">
                    <g:hiddenField name="${param.key}" value="${param.value}"/>
                </g:if>
            </g:each>
        </g:form>
    </g:else>

    <!-- confirm dialog content body -->
    <table style="margin: 3px 0 0 10px">
        <tbody><tr>
            <td valign="top">
                <img src="/jbilling/images/icon34.gif" alt="">
            </td>
            <td class="col2" style="padding-left: 7px">
                <g:message code="${message}" args="[id]"/>
            </td>
        </tr></tbody>
    </table>
</div>

<script type="text/javascript">
    $(function() {
        setTimeout(function() {
            $('#confirm-dialog-${name}').dialog({
                autoOpen: false,
                height: 200,
                width: 375,
                modal: true,
                buttons: {
{'fraction_non_alphanumeric': 0.1595081691089776, 'fraction_numerical': 0.007074279939363315, 'mean_word_length': 2.166933333333333, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3718660', 'n_tokens_mistral': 1750, 'n_tokens_neox': 1646, 'n_words': 502}