From: soufiane Date: Thu, 23 Oct 2025 16:15:23 +0000 (+0200) Subject: wait #7574 @0:20 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=30f6f4cf7b361eb3869431a09e19ede571c42438;p=fluidbook-toolbox.git wait #7574 @0:20 --- diff --git a/resources/views/vendor/backpack/crud/form_content.blade.php b/resources/views/vendor/backpack/crud/form_content.blade.php index b7dbb1467..795d25b54 100644 --- a/resources/views/vendor/backpack/crud/form_content.blade.php +++ b/resources/views/vendor/backpack/crud/form_content.blade.php @@ -237,6 +237,36 @@ if (window.location.hash) { $("input[name='_current_tab']").val(window.location.hash.substr(1)); } + + if($('[data-class="external_path_server_select"]').length > 0) { + function applyServerChange(s) { + if (getInitialValue() !== $(s).val()) { + $('a#s_section_downloads').addClass('non-default') + $("[name=hidden_install_online]").val($(s).val()) + } else { + $('a#s_section_downloads').removeClass('non-default') + $("[name=hidden_install_online]").val(getInitialValue()) + } + } + + function getInitialValue() { + return $("[name=hidden_install_online]").attr('data-initial') + } + + function setInitialValue() { + $("[name=hidden_install_online]").attr('data-initial', $('[data-class="external_path_server_select"]').val()) + } + + setInitialValue() + + $(document).on('change', '[data-class="external_path_server_select"]', function () { + applyServerChange($(this)); + }); + + $(document).on('keyup keydown', '[data-class="external_path_server_path"]', function () { + applyServerChange($(this)); + }); + } });