<commit_before>{* $Id$ *}
{if empty($user) || $user eq 'anonymous' || !empty($showantibot)}
	<div class="form-group">
		{if $captchalib->type eq 'recaptcha'}
			{$captchalib->render()}
		{else}
			<input type="hidden" name="captcha[id]" id="captchaId" value="{$captchalib->generate()}">
			<label class="control-label" for="antibotcode">{tr}Enter what you see{/tr}{if $showmandatory eq 'y'}<span class="attention"> *</span>{/if}</label>
			<input class="form-control" type="text" maxlength="8" size="22" name="captcha[input]" id="antibotcode">
			{if $captchalib->type eq 'default'}
				<img id="captchaImg" src="{$captchalib->getPath()}" alt="{tr}Anti-Bot verification code image{/tr}" height="50">
			{else}
				{* dumb captcha *}
				{$captchalib->render()}
			{/if}
		{/if}

		{if $captchalib->type eq 'default'}
			{button _id='captchaRegenerate' _class='' href='#antibot' _text='{tr}Try another code{/tr} {icon name="refresh"}' _onclick="generateCaptcha()"}
		{/if}
	</div>
{/if}
{jq}
if($("#antibotcode").parents('form').data("validator")) {
	$( "#antibotcode" ).rules( "add", {
		required: true,
		remote: {
			url: "validate-ajax.php",
			type: "post",
			data: {
				validator: "captcha",
				parameter: function() {<commit_msg>[FIX] antibot: Icon in button<commit_after>{* $Id$ *}
{if empty($user) || $user eq 'anonymous' || !empty($showantibot)}
	<div class="form-group">
		{if $captchalib->type eq 'recaptcha'}
			{$captchalib->render()}
		{else}
			<input type="hidden" name="captcha[id]" id="captchaId" value="{$captchalib->generate()}">
			<label class="control-label" for="antibotcode">{tr}Enter what you see{/tr}{if $showmandatory eq 'y'}<span class="attention"> *</span>{/if}</label>
			<input class="form-control" type="text" maxlength="8" size="22" name="captcha[input]" id="antibotcode">
			{if $captchalib->type eq 'default'}
				<img id="captchaImg" src="{$captchalib->getPath()}" alt="{tr}Anti-Bot verification code image{/tr}" height="50">
			{else}
				{* dumb captcha *}
				{$captchalib->render()}
			{/if}
		{/if}

		{if $captchalib->type eq 'default'}
			{button _id='captchaRegenerate' _class='' href='#antibot' _text='{tr}Try another code{/tr}' _icon_name="refresh" _onclick="generateCaptcha()"}
		{/if}
	</div>
{/if}
{jq}
if($("#antibotcode").parents('form').data("validator")) {
	$( "#antibotcode" ).rules( "add", {
		required: true,
		remote: {
			url: "validate-ajax.php",
			type: "post",
			data: {
				validator: "captcha",
				parameter: function() {
{'fraction_non_alphanumeric': 0.22761942994781212, 'fraction_numerical': 0.004014452027298274, 'mean_word_length': 5.199004975124378, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 35, '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': '5486035', 'n_tokens_mistral': 1067, 'n_tokens_neox': 917, 'n_words': 185}