<script>
// v1.27.3 — إظهار شريط الإجراءات عند تحديد أي سجل
document.addEventListener('DOMContentLoaded', function() {
    var checkboxes = document.querySelectorAll('input[name="payment_ids[]"]');
    var bulkBar = document.getElementById('bulk-actions-bottom');
    var countSpan = document.getElementById('bulk-selected-count');

    function updateBulkBar() {
        var checked = document.querySelectorAll('input[name="payment_ids[]"]:checked');
        if (checked.length > 0 && bulkBar) {
            bulkBar.style.display = 'block';
            if (countSpan) countSpan.textContent = checked.length + ' selected / محدد';
        } else if (bulkBar) {
            bulkBar.style.display = 'none';
        }
    }

    checkboxes.forEach(function(cb) {
        cb.addEventListener('change', updateBulkBar);
    });

    var selectAll = document.getElementById('cb-select-all');
    if (selectAll) {
        selectAll.addEventListener('change', function() {
            checkboxes.forEach(function(cb) {
                cb.checked = selectAll.checked;
            });
            updateBulkBar();
        });
    }
});

function crcicaToggleBulkFields(pos) {
    var sel = document.getElementById('bulk-action-select-' + pos);
    var cf = document.getElementById('bulk-company-field-' + pos);
    var nf = document.getElementById('bulk-nationality-field-' + pos);
    var amf = document.getElementById('bulk-attendance-mode-field-' + pos);
    if (cf) cf.style.display = (sel.value === 'bulk_update_company') ? 'inline' : 'none';
    if (nf) nf.style.display = (sel.value === 'bulk_update_nationality') ? 'inline' : 'none';
    if (amf) amf.style.display = (sel.value === 'bulk_update_attendance_mode') ? 'inline' : 'none';
}

function crcicaConfirmBulk() {
    var checked = document.querySelectorAll('input[name="payment_ids[]"]:checked');
    if (checked.length === 0) {
        alert('Please select records first / يرجى تحديد سجلات أولاً');
        return false;
    }
    return confirm('Apply to selected records?');
}
</script>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://crcica.org/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://crcica.org/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-posts-espresso_events-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-posts-espresso_venues-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-posts-news-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-posts-my-history-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-posts-caseload_report-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-taxonomies-espresso_event_categories-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-taxonomies-espresso_event_type-1.xml</loc></sitemap><sitemap><loc>https://crcica.org/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
