Persistent selection of the application override
authorAlexander Ebert <ebert@woltlab.com>
Fri, 21 Jun 2019 10:42:20 +0000 (12:42 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 21 Jun 2019 10:42:20 +0000 (12:42 +0200)
See #2934

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

index efd8caf2be9316a356a896fbe0a7f8c6b1990fd3..c889c3e3541682c3e3551825724a17f277a95b51 100644 (file)
                                                <dt><label for="overrideApplicationPackageID">{lang}wcf.acp.page.application{/lang}</label></dt>
                                                <dd>
                                                        <select name="overrideApplicationPackageID" id="overrideApplicationPackageID">
+                                                               {assign var='_overrideApplicationPackageID' value=$overrideApplicationPackageID}
+                                                               {if !$_overrideApplicationPackageID}{assign var='_overrideApplicationPackageID' value=$page->applicationPackageID}{/if}
                                                                {foreach from=$availableApplications item=availableApplication}
-                                                                       <option value="{@$availableApplication->packageID}"{if $availableApplication->packageID == $overrideApplicationPackageID} selected{/if}>{$availableApplication->domainName}{$availableApplication->domainPath}</option>
+                                                                       <option value="{@$availableApplication->packageID}"{if $availableApplication->packageID == $_overrideApplicationPackageID} selected{/if}>{$availableApplication->domainName}{$availableApplication->domainPath}</option>
                                                                {/foreach}
                                                        </select>
                                                        {if $errorField == 'overrideApplicationPackageID'}