imthebest
Well-known member
I have modified template helper_thread_watch_input to set the status of the "Watch this thread..." checkbox always checked only when creating a thread (not when replying to an existing one):
Problem it that it's not working. However if I remove the conditional and just replace this:
With this:
Then it works but not only on thread_create template but also on thread_reply which I don't want.
What's wrong with the conditional that I'm using? Why it doesn't work?
Code:
<xen:if is="{$contentTemplate} == 'thread_create'">
<label for="ctrl_watch_thread"><input type="checkbox" name="watch_thread" value="1" id="ctrl_watch_thread" class="Disabler" checked /> {xen:phrase watch_this_thread_sentence}...</label>
<xen:else />
<label for="ctrl_watch_thread"><input type="checkbox" name="watch_thread" value="1" id="ctrl_watch_thread" class="Disabler" {xen:checked $watchState} /> {xen:phrase watch_this_thread_sentence}...</label>
</xen:if>
Problem it that it's not working. However if I remove the conditional and just replace this:
Code:
<label for="ctrl_watch_thread"><input type="checkbox" name="watch_thread" value="1" id="ctrl_watch_thread" class="Disabler" {xen:checked $watchState} /> {xen:phrase watch_this_thread_sentence}...</label>
With this:
Code:
<label for="ctrl_watch_thread"><input type="checkbox" name="watch_thread" value="1" id="ctrl_watch_thread" class="Disabler" checked /> {xen:phrase watch_this_thread_sentence}...</label>
Then it works but not only on thread_create template but also on thread_reply which I don't want.
What's wrong with the conditional that I'm using? Why it doesn't work?