Remove unreachable code for the dark mode SCSS
authorAlexander Ebert <ebert@woltlab.com>
Tue, 6 Jun 2023 11:49:52 +0000 (13:49 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 6 Jun 2023 11:49:52 +0000 (13:49 +0200)
This code path is unreachable because the validation can only check against the entire code. This means that the check will fail for the regular field, but the error message implies that the error might also be part of the dark mode’s code.

Fixes #5533

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

index ff1e4eb40549565b7398a0eb7790c0b80ebb3e54..fd72d87817b78690060dd7ff45ef650667d09492 100644 (file)
                                        </section>
 
                                        {if $action === 'edit' && $style->hasDarkMode}
-                                               <section class="section"{if $errorField == 'individualScssDarkMode'} formError{/if}>
+                                               <section class="section">
                                                        <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualScssDarkMode{/lang}</h2>
                                                        
                                                        <dl class="wide">
                                                                        </div>
                                                                        <small>{lang}wcf.acp.style.advanced.individualScssDarkMode.description{/lang}</small>
                                                                </dd>
-                                                               {if $errorField == 'individualScssDarkMode'}
-                                                                       <small class="innerError">
-                                                                               {lang}wcf.acp.style.advanced.individualScssDarkMode.error{/lang}
-                                                                       </small>
-                                                               {/if}
                                                        </dl>
                                                </section>
                                        {/if}
                        </section>
                        
                        {if $action === 'edit' && $style->hasDarkMode}
-                               <section class="section{if $errorField == 'individualScssDarkMode' && $isTainted} formError{/if}">
+                               <section class="section>
                                        <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualScssDarkMode{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
                                        
                                        <dl class="wide">
                                                        </div>
                                                        <small>{lang}wcf.acp.style.advanced.individualScssDarkMode.description{/lang}</small>
                                                </dd>
-                                               {if $errorField == 'individualScssDarkMode' && $isTainted}
-                                                       <small class="innerError">
-                                                               {lang}wcf.acp.style.advanced.individualScssDarkMode.error{/lang}
-                                                       </small>
-                                               {/if}
                                        </dl>
                                </section>
                        {/if}