Commit | Line | Data |
---|---|---|
567b90a3 MS |
1 | <label><input type="checkbox" id="search_{$option->optionName}" name="searchOptions[{$option->optionName}]"{if $searchOption} checked="checked"{/if} /> {lang}wcf.user.option.searchRadioButtonOption{/lang}</label> |
2 | <select id="{$option->optionName}" name="values[{$option->optionName}][]" multiple="multiple" size="{if $selectOptions|count > 10}10{else}{@$selectOptions|count}{/if}"{if !$searchOption} disabled="disabled"{/if}> | |
3 | {foreach from=$selectOptions key=key item=selectOption} | |
4 | <option value="{$key}"{if $key|in_array:$value} selected="selected"{/if}>{lang}{@$selectOption}{/lang}</option> | |
5 | {/foreach} | |
6 | </select> | |
7 | ||
8 | <script data-relocate="true"> | |
9 | //<![CDATA[ | |
10 | $(function() { | |
11 | $('#search_{$option->optionName}').change(function(event) { | |
12 | if ($(event.currentTarget).prop('checked')) { | |
13 | $('#{$option->optionName}').enable(); | |
14 | } | |
15 | else { | |
16 | $('#{$option->optionName}').disable(); | |
17 | } | |
18 | }); | |
19 | }); | |
20 | //]]> | |
21 | </script> |