Use internal functions to hide/show an element
authorJoshua Rüsweg <josh@bastelstu.be>
Fri, 3 Aug 2018 16:11:24 +0000 (18:11 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Fri, 3 Aug 2018 16:11:24 +0000 (18:11 +0200)
See #2635

wcfsetup/install/files/acp/templates/userTrophyAdd.tpl

index b94f2a17586134a4fc5cd79b56b7c95dfdbc239f..afa26db014cbec62b39905d668383496a271a473 100644 (file)
                
                elBySel('input[name=useCustomDescription]').addEventListener('click', function () {
                        if (elBySel('input[name=useCustomDescription]').checked) {
-                               elById('userTrophyDescriptionDL').style.display = 'block';
-                               elById('trophyUseHtmlDL').style.display = 'block';
+                               elShow(elById('userTrophyDescriptionDL'));
+                               elShow(elById('trophyUseHtmlDL'));
                        }
                        else {
-                               elById('userTrophyDescriptionDL').style.display = 'none';
-                               elById('trophyUseHtmlDL').style.display = 'none';
+                               elHide(elById('userTrophyDescriptionDL'));
+                               elHide(elById('trophyUseHtmlDL'));
                        }
                });
        });