Show the “pollIsPublic” setting when editing polls
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 8 May 2023 11:59:30 +0000 (13:59 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 8 May 2023 11:59:30 +0000 (13:59 +0200)
The checkbox is marked as disabled, as the setting may not be changed after the
fact.

com.woltlab.wcf/templates/__messageFormPoll.tpl
com.woltlab.wcf/templates/__messageFormPollInline.tpl

index 12b5e0665ffaa30a16930a12b42e167e28907a92..6875ce6d203467aecc11d9f38ae5997b7f1c8b00 100644 (file)
@@ -74,9 +74,9 @@
                        <dd>
                                <label><input type="checkbox" name="pollIsChangeable" value="1"{if $pollIsChangeable} checked{/if}> {lang}wcf.poll.isChangeable{/lang}</label>
                        </dd>
-                       {if !$pollID && $__wcf->getPollManager()->canStartPublicPoll()}
+                       {if $pollID || $__wcf->getPollManager()->canStartPublicPoll()}
                                <dd>
-                                       <label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked{/if}> {lang}wcf.poll.isPublic{/lang}</label>
+                                       <label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked{/if} {if $pollID}disabled{/if}> {lang}wcf.poll.isPublic{/lang}</label>
                                </dd>
                        {/if}
                        <dd>
index 6768f812dfd50386d8552e4c22e314aee34c9c47..65aeff2c92b175dce8da53178457b93d3d7d08df 100644 (file)
@@ -55,9 +55,9 @@
                        <dd>
                                <label><input type="checkbox" name="pollIsChangeable" id="{$wysiwygSelector}Poll_isChangeable" value="1"{if $pollIsChangeable} checked{/if}> {lang}wcf.poll.isChangeable{/lang}</label>
                        </dd>
-                       {if !$pollID && $__wcf->getPollManager()->canStartPublicPoll()}
+                       {if $pollID || $__wcf->getPollManager()->canStartPublicPoll()}
                                <dd>
-                                       <label><input type="checkbox" name="pollIsPublic" id="{$wysiwygSelector}Poll_isPublic" value="1"{if $pollIsPublic} checked{/if}> {lang}wcf.poll.isPublic{/lang}</label>
+                                       <label><input type="checkbox" name="pollIsPublic" id="{$wysiwygSelector}Poll_isPublic" value="1"{if $pollIsPublic} checked{/if} {if $pollID}disabled{/if}> {lang}wcf.poll.isPublic{/lang}</label>
                                </dd>
                        {/if}
                        <dd>