<commit_before>{if $__showPoll|isset && $__showPoll}
	<script data-relocate="true">
		$(function() {
			WCF.Language.addObject({
				'wcf.poll.button.addOption': '{jslang}wcf.poll.button.addOption{/jslang}',
				'wcf.poll.button.removeOption': '{jslang}wcf.poll.button.removeOption{/jslang}'
			});
			
			new WCF.Poll.Management('pollOptionContainer', [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ], {@POLL_MAX_OPTIONS});
		});
	</script>
	
	<div id="poll" class="jsOnly messageTabMenuContent">
		<dl{if $errorField == 'pollOptions'} class="formError"{/if}>
			<dt>
				<label for="pollQuestion">{lang}wcf.poll.question{/lang}</label>
			</dt>
			<dd>
				<input type="text" name="pollQuestion" id="pollQuestion" value="{$pollQuestion}" class="long" maxlength="255">
				{if $errorField == 'pollQuestion'}
					<small class="innerError">
						{lang}wcf.global.form.error.empty{/lang}
					</small>
				{/if}
			</dd>
			<dt>
				<label>{lang}wcf.poll.options{/lang}</label>
			</dt>
			<dd id="pollOptionContainer" class="pollOptionContainer sortableListContainer">
				<ol class="sortableList"></ol>
				{if $errorField == 'pollOptions'}
					<small class="innerError">
						{lang}wcf.global.form.error.empty{/lang}
					</small>
				{/if}
				<small>{lang}wcf.poll.options.description{/lang}</small>
			</dd>
		</dl>
		<dl{if $errorField == 'pollEndTime'} class="formError"{/if}>
			<dt>
				<label for="pollEndTime">{lang}wcf.poll.endTime{/lang}</label>
			</dt>
			<dd>
				<input type="datetime" tabindex="-1" name="pollEndTime" id="pollEndTime" value="{if $pollEndTime}{@$pollEndTime|date:'c'}{/if}" class="medium">
				{if $errorField == 'pollEndTime'}
					<small class="innerError">
						{lang}wcf.poll.endTime.error.{@$errorType}{/lang}
					</small>
				{/if}
			</dd>
		</dl>
		<dl{if $errorField == 'pollMaxVotes'} class="formError"{/if}>
			<dt>
				<label for="pollMaxVotes">{lang}wcf.poll.maxVotes{/lang}</label>
			</dt>
			<dd>
				<input type="number" name="pollMaxVotes" id="pollMaxVotes" value="{@$pollMaxVotes}" min="1" class="tiny">
				{if $errorField == 'pollMaxVotes'}
					<small class="innerError">
						{lang}wcf.poll.maxVotes.error.{@$errorType}{/lang}
					</small>
				{/if}
			</dd>
		</dl>
		<dl>
			<dt></dt>
			<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()}
				<dd>
					<label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked{/if}> {lang}wcf.poll.isPublic{/lang}</label>
				</dd>
			{/if}
			<dd>
				<label><input type="checkbox" name="pollResultsRequireVote" value="1"{if $pollResultsRequireVote} checked{/if}> {lang}wcf.poll.resultsRequireVote{/lang}</label>
				<small>{lang}wcf.poll.resultsRequireVote.description{/lang}</small>
			</dd>
			<dd>
				<label><input type="checkbox" name="pollSortByVotes" value="1"{if $pollSortByVotes} checked{/if}> {lang}wcf.poll.sortByVotes{/lang}</label>
			</dd>
		</dl>
		
		{event name='fields'}
	</div>
{/if}
<commit_msg>Use TypeScript implementation for message polls<commit_after>{if $__showPoll|isset && $__showPoll}
	<script data-relocate="true">
		require(['Language', 'WoltLabSuite/Core/Ui/Poll/Editor', 'EventHandler'], function (Language, UiPollEditor, EventHandler) {
			Language.addObject({
				'wcf.poll.button.addOption': '{jslang}wcf.poll.button.addOption{/jslang}',
				'wcf.poll.button.removeOption': '{jslang}wcf.poll.button.removeOption{/jslang}',
			});

			new UiPollEditor(
				'pollOptionContainer',
				[ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
				"",
				{
					maxOptions: {@POLL_MAX_OPTIONS}
				}
			);
		});
	</script>

	<div id="poll" class="jsOnly messageTabMenuContent">
		<dl{if $errorField == 'pollOptions'} class="formError"{/if}>
			<dt>
				<label for="pollQuestion">{lang}wcf.poll.question{/lang}</label>
			</dt>
			<dd>
				<input type="text" name="pollQuestion" id="pollQuestion" value="{$pollQuestion}" class="long" maxlength="255">
				{if $errorField == 'pollQuestion'}
					<small class="innerError">
						{lang}wcf.global.form.error.empty{/lang}
					</small>
				{/if}
			</dd>
			<dt>
				<label>{lang}wcf.poll.options{/lang}</label>
			</dt>
			<dd id="pollOptionContainer" class="pollOptionContainer sortableListContainer">
				<ol class="sortableList"></ol>
				{if $errorField == 'pollOptions'}
					<small class="innerError">
						{lang}wcf.global.form.error.empty{/lang}
					</small>
				{/if}
				<small>{lang}wcf.poll.options.description{/lang}</small>
			</dd>
		</dl>
		<dl{if $errorField == 'pollEndTime'} class="formError"{/if}>
			<dt>
				<label for="pollEndTime">{lang}wcf.poll.endTime{/lang}</label>
			</dt>
			<dd>
				<input type="datetime" tabindex="-1" name="pollEndTime" id="pollEndTime" value="{if $pollEndTime}{@$pollEndTime|date:'c'}{/if}" class="medium">
				{if $errorField == 'pollEndTime'}
					<small class="innerError">
						{lang}wcf.poll.endTime.error.{@$errorType}{/lang}
					</small>
				{/if}
			</dd>
		</dl>
		<dl{if $errorField == 'pollMaxVotes'} class="formError"{/if}>
			<dt>
				<label for="pollMaxVotes">{lang}wcf.poll.maxVotes{/lang}</label>
			</dt>
			<dd>
				<input type="number" name="pollMaxVotes" id="pollMaxVotes" value="{@$pollMaxVotes}" min="1" class="tiny">
				{if $errorField == 'pollMaxVotes'}
					<small class="innerError">
						{lang}wcf.poll.maxVotes.error.{@$errorType}{/lang}
					</small>
				{/if}
			</dd>
		</dl>
		<dl>
			<dt></dt>
			<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()}
				<dd>
					<label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked{/if}> {lang}wcf.poll.isPublic{/lang}</label>
				</dd>
			{/if}
			<dd>
				<label><input type="checkbox" name="pollResultsRequireVote" value="1"{if $pollResultsRequireVote} checked{/if}> {lang}wcf.poll.resultsRequireVote{/lang}</label>
				<small>{lang}wcf.poll.resultsRequireVote.description{/lang}</small>
			</dd>
			<dd>
				<label><input type="checkbox" name="pollSortByVotes" value="1"{if $pollSortByVotes} checked{/if}> {lang}wcf.poll.sortByVotes{/lang}</label>
			</dd>
		</dl>

		{event name='fields'}
	</div>
{/if}

{'fraction_non_alphanumeric': 0.20849070856624868, 'fraction_numerical': 0.0027194440247771566, 'mean_word_length': 4.351657235246564, 'pattern_counts': {'":': 0, '<': 153, '<?xml version=': 0, '>': 157, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4221685', 'n_tokens_mistral': 2908, 'n_tokens_neox': 2473, 'n_words': 359}