<?php
// Copyright 1999-2026. WebPros International GmbH. All rights reserved.
?>

<?php echo $this->masterCheckbox('urlTarget-internal', ['urlTarget-noFrame'], true, false) ?>

<script type="text/javascript">
//<![CDATA[
(function () {
    function updateUrlPartsSettings() {
        var place = document.getElementById('place').value;
        var allowedPlaces = <?php echo json_encode($this->form->urlParamsAllowedPlaces) ?>;
        Object.keys(allowedPlaces).forEach(function (urlParam) {
            if (allowedPlaces[urlParam].indexOf(place) === -1) {
                document.getElementById('urlParams-' + urlParam).disabled = true;
            } else {
                document.getElementById('urlParams-' + urlParam).disabled = false;
            }
        });
    }

    document.getElementById('place').addEventListener('change', updateUrlPartsSettings);
    updateUrlPartsSettings();

    document.getElementById('text').focus();
})();
//]]>
</script>
