Enforce the selection of a landing page for WoltLab Suite Core in applicationManagement
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 8 May 2023 14:13:52 +0000 (16:13 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 8 May 2023 14:13:52 +0000 (16:13 +0200)
This is enforced in the template only, because the PHP logic already needs to
handle a NULL landing page, as the global landing page could be deleted or
uninstalled. It will implicitly fall back to the ArticleList then.

Resolves #4843

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

index 2f53269816f3484ce0e0bbd9220f7cacf1876bb2..6037473332925ccc9e760e3921cf02ccd293a109 100644 (file)
@@ -98,8 +98,9 @@
                                                                <small>{$application->getPageURL()}</small>
                                                        </td>
                                                        <td class="columnText columnLandingPageID">
-                                                               <select name="landingPageID[{$application->packageID}]">
-                                                                       <option value="0">{lang}wcf.acp.application.landingPage.default{/lang}</option>
+                                                               <select name="landingPageID[{$application->packageID}]" required>
+                                                                       <option value="">{lang}wcf.global.noSelection{/lang}</option>
+                                                                       <option value="0"{if $application->getAbbreviation() !== 'wcf'}{if $application->landingPageID === null} selected{/if}{else} disabled{/if}>{lang}wcf.acp.application.landingPage.default{/lang}</option>
                                                                        
                                                                        {foreach from=$pageNodeList item=pageNode}
                                                                                {if !$pageNode->isDisabled && !$pageNode->requireObjectID && !$pageNode->excludeFromLandingPage}