From 9d7ecd7bebe050b44937a9ba22a28dcc06af0250 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 1 Jun 2016 18:51:13 +0200 Subject: [PATCH] Fixed creation of multilingual system boxes --- .../install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js index a0cf341d18..4ab6b63641 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js @@ -51,10 +51,19 @@ define(['Core', 'Language', 'Ui/Dialog'], function(Core, Language, UiDialog) { event.preventDefault(); var boxType = elBySel('input[name="boxType"]:checked', content).value; - var isMultilingual = elBySel('input[name="isMultilingual"]:checked', content).value; + var isMultilingual = 0; + if (boxType !== 'system') isMultilingual = elBySel('input[name="isMultilingual"]:checked', content).value; window.location = _link.replace(/{\$boxType}/, boxType).replace(/{\$isMultilingual}/, isMultilingual); }); + + elBySelAll('input[type="radio"][name="boxType"]', content, function(element) { + element.addEventListener('change', function(event) { + elBySelAll('input[type="radio"][name="isMultilingual"]', content, function(element) { + element.disabled = (event.currentTarget.value === 'system'); + }); + }); + }); }, title: Language.get('wcf.acp.box.add') } -- 2.20.1