Fixed disabling of the landing page
authorMarcel Werk <burntime@woltlab.com>
Fri, 27 May 2016 16:08:01 +0000 (18:08 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 27 May 2016 16:19:42 +0000 (18:19 +0200)
wcfsetup/install/files/acp/templates/pageAdd.tpl

index a21a56526b18b798f85e8cdcf787c46a4caa8ff8..e39174a8e03f2a19eaf7af7b20e068a5f59ffb75 100644 (file)
                        }
                }).trigger('change');
                
-               $('#isDisabled').change(function(event) {
-                       if ($('#isDisabled')[0].checked) {
-                               $('#isLandingPage')[0].checked = false;
-                               $('#isLandingPage')[0].disabled = true;
-                       }
-                       else {
-                               $('#isLandingPage')[0].disabled = false;
-                       }
-               }).trigger('change');
+               {if $action != 'edit' || !$page->isLandingPage}
+                       $('#isDisabled').change(function(event) {
+                               if ($('#isDisabled')[0].checked) {
+                                       $('#isLandingPage')[0].checked = false;
+                                       $('#isLandingPage')[0].disabled = true;
+                               }
+                               else {
+                                       $('#isLandingPage')[0].disabled = false;
+                               }
+                       }).trigger('change');
+               {/if}
        });
 </script>