Merge branch 'master' into next
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / tagInput.tpl
1 {if $__wcf->session->getPermission('user.tag.canViewTag')}
2 <dl class="jsOnly">
3 <dt><label for="tagSearchInput{if $tagInputSuffix|isset}{@$tagInputSuffix}{/if}">{lang}wcf.tagging.tags{/lang}</label></dt>
4 <dd>
5 <input id="tagSearchInput{if $tagInputSuffix|isset}{@$tagInputSuffix}{/if}" type="text" value="" class="long" />
6 <small>{lang}wcf.tagging.tags.description{/lang}</small>
7 </dd>
8 </dl>
9
10 <script data-relocate="true">
11 require(['WoltLab/WCF/UI/ItemList'], function(UIItemList) {
12 UIItemList.init(
13 'tagSearchInput{if $tagInputSuffix|isset}{@$tagInputSuffix}{/if}',
14 [{if $tags|isset && $tags|count}{implode from=$tags item=tag}'{$tag|encodeJS}'{/implode}{/if}],
15 {
16 ajax: {
17 className: 'wcf\\data\\tag\\TagAction'
18 },
19 maxLength: {@TAGGING_MAX_TAG_LENGTH},
20 submitFieldName: 'tags[]'
21 }
22 );
23 });
24 </script>
25 {/if}