| 1 | <label><input type="checkbox" id="search_{$option->optionName}" name="searchOptions[{$option->optionName}]"{if $searchOption} checked{/if}> {lang}wcf.user.option.searchTextOption{/lang}</label> |
| 2 | <input type="{@$inputType}" id="{$option->optionName}" name="values[{$option->optionName}]" value="{$value}"{if $inputClass} class="{@$inputClass}"{/if}{if !$searchOption} disabled{/if}{if $option->required} required{/if}> |
| 3 | |
| 4 | <script data-relocate="true"> |
| 5 | $(function() { |
| 6 | $('#search_{$option->optionName}').change(function(event) { |
| 7 | if ($(event.currentTarget).prop('checked')) { |
| 8 | $('#{$option->optionName}').enable(); |
| 9 | |
| 10 | {if $inputType === 'date'} |
| 11 | $('#{$option->optionName}DatePicker').enable(); |
| 12 | {/if} |
| 13 | } |
| 14 | else { |
| 15 | $('#{$option->optionName}').disable(); |
| 16 | |
| 17 | {if $inputType === 'date'} |
| 18 | $('#{$option->optionName}DatePicker').disable(); |
| 19 | {/if} |
| 20 | } |
| 21 | }); |
| 22 | |
| 23 | {if !$searchOption} |
| 24 | $('#{$option->optionName}DatePicker').disable(); |
| 25 | {/if} |
| 26 | }); |
| 27 | </script> |