Preset button states to prevent layout jumps
authorAlexander Ebert <ebert@woltlab.com>
Fri, 3 Jun 2016 22:48:15 +0000 (00:48 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 3 Jun 2016 22:48:21 +0000 (00:48 +0200)
com.woltlab.wcf/templates/poll.tpl

index 4d78b4a151b1d7707c16c46b66063633b1b42cf3..e72ff6291fee0b8454cd40363a7f1a5197738f16 100644 (file)
@@ -40,6 +40,7 @@
                <div class="formSubmit jsOnly"{if !$poll->canVote() && $__pollView === 'result'} style="display: none"{/if}>
                        {content}
                                {if $__wcf->getUser()->userID}
+                                       <button class="small jsButtonPollVote"{if $poll->canVote()} disabled{else} style="display: none;"{/if}>{lang}wcf.poll.button.vote{/lang}</button>
                                        <button class="small jsButtonPollShowVote"{if $__pollView === 'vote'} style="display: none;"{/if}>{lang}wcf.poll.button.showVote{/lang}</button>
                                        <button class="small jsButtonPollShowResult"{if $__pollView === 'result'} style="display: none;"{/if}>{lang}wcf.poll.button.showResult{/lang}</button>
                                {/if}