Verbose style compatibility for 5.2/5.3
authorAlexander Ebert <ebert@woltlab.com>
Fri, 20 Nov 2020 16:16:19 +0000 (17:16 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 20 Nov 2020 16:16:19 +0000 (17:16 +0100)
Fixes #3737

wcfsetup/install/files/acp/templates/styleAdd.tpl
wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php

index 7877c4dfd77c8f23ca6c8644d889f8e7deabb115..9cc88913b6363ab3288cc68dfafa50eda7821283 100644 (file)
                                        <dd>
                                                <select name="apiVersion" id="apiVersion"{if !$isTainted} disabled{/if}>
                                                        {foreach from=$supportedApiVersions item=supportedApiVersion}
-                                                               <option value="{$supportedApiVersion}"{if $supportedApiVersion === $apiVersion} selected{/if}>{$supportedApiVersion} ({lang}wcf.acp.style.apiVersion.{if $supportedApiVersion === $recommendedApiVersion}recommended{else}deprecated{/if}{/lang})</option>
+                                                               <option value="{$supportedApiVersion}"{if $supportedApiVersion === $apiVersion} selected{/if}>{$supportedApiVersionsCompatibility[$supportedApiVersion]} ({lang}wcf.acp.style.apiVersion.{if $supportedApiVersion === $recommendedApiVersion}recommended{else}deprecated{/if}{/lang})</option>
                                                        {/foreach}
                                                </select>
                                                <small>{lang}wcf.acp.style.apiVersion.description{/lang}</small>
index 82db013705fd949e0b2d143449f4149f506259cf..fb5e2b02b4264030ed8348a8ce49d4bc1361d164 100644 (file)
@@ -225,6 +225,12 @@ class StyleAddForm extends AbstractForm {
         */
        public $customAssets = [];
        
+       public $supportedApiVersionsCompatibility = [
+               '3.0' => '3.0',
+               '3.1' => '3.1',
+               '5.2' => '5.2 / 5.3',
+       ];
+       
        /**
         * @inheritDoc
         */
@@ -887,6 +893,7 @@ class StyleAddForm extends AbstractForm {
                        'tmpHash' => $this->tmpHash,
                        'variables' => $this->variables,
                        'supportedApiVersions' => Style::$supportedApiVersions,
+                       'supportedApiVersionsCompatibility' => $this->supportedApiVersionsCompatibility,
                        'newVariables' => $this->newVariables,
                        'scrollOffsets' => $this->scrollOffsets,
                        'coverPhotoMinHeight' => UserCoverPhoto::MIN_HEIGHT,