{% if is_granted('IS_AUTHENTICATED_FULLY') and app.session.get('pending-policies') %}{% set policies = app.session.get('pending-policies') %}{% set types = policies|map(policy => policy.type) %}<div class="modal fade show" id="acceptDeclinePoliciesModal" tabindex="-1" role="dialog" data-bs-backdrop="static" data-bs-keyboard="false"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header important-note-heading"><h1>Policy Updates</h1></div><div class="modal-body"><div><br><div class="two-fa row mb-2"><div class="two-fa step-row"><div class="two-fa step-text">We have updated our{{ ' ' }}{%- for policy in types -%}{%- if loop.first -%}{%- if policy == 1 -%}<a href="https://medbrief.com/services-agreement/" rel="noopener noreferrer nofollow" target="_blank">Services Agreement</a>{%- elseif policy == 2 -%}<a href="https://medbrief.com/privacy-policy/" rel="noopener noreferrer nofollow" target="_blank">Privacy Policy</a>{%- elseif policy == 3 -%}<a href="https://medbrief.com/cookie-policy/" rel="noopener noreferrer nofollow" target="_blank">Cookie Policy</a>{%- endif -%}{%- else -%}{%- if loop.last and not loop.first %}and{% else %},{% endif -%}{%- if policy == 1 -%}<a href="https://medbrief.com/services-agreement/" rel="noopener noreferrer nofollow" target="_blank">Services Agreement</a>{%- elseif policy == 2 -%}<a href="https://medbrief.com/privacy-policy/" rel="noopener noreferrer nofollow" target="_blank">Privacy Policy</a>{%- elseif policy == 3 -%}<a href="https://medbrief.com/cookie-policy/" rel="noopener noreferrer nofollow" target="_blank">Cookie Policy</a>{%- endif -%}{%- endif -%}{%- endfor -%}.</div></div></div><div class="two-fa row mb-2"><div class="two-fa step-row"><div class="two-fa step-text">Please review the updated policies and acknowledge your acceptance before continuing to use our services.</div></div></div><div class="row "><div class="two-fa"><div class="mt-3"><a href="{{ path('user_policy_decline_policies') }}" class="btn btn-secondary me-2">I decline</a><a href="{{ path('user_policy_accept_policies') }}" class="btn btn-primary me-2">I accept</a></div></div></div></div><!-- /.modal-content --></div><!-- /.modal-dialog --></div><!-- /.modal --><script>// Initialize the policy modal on page loadwindow.addEventListener('load', function () {var policyModal = document.getElementById('acceptDeclinePoliciesModal');if (policyModal) {// Add custom class to backdrop when modal is shown for z-index targetingpolicyModal.addEventListener('shown.bs.modal', function () {var backdrops = document.querySelectorAll('.modal-backdrop');if (backdrops.length > 0) {// Get the last backdrop (most recently created)var backdrop = backdrops[backdrops.length - 1];backdrop.classList.add('policy-modal-backdrop');}});// Show the modal$('#acceptDeclinePoliciesModal').modal('show');}});</script>{% endif %}