<commit_before>{* $Id$ *}
{jq notonready=true}
function capLock(e, el){
	kc = e.keyCode ? e.keyCode : e.which;
	sk = e.shiftKey ? e.shiftKey : (kc == 16 ? true : false);
	if ((kc >= 65 && kc <= 90 && !sk) || (kc >= 97 && kc <= 122 && sk)) {
		$('.divCapson', $(el).parents('div:first')).show();
	} else {
		$('.divCapson', $(el).parents('div:first')).hide();
	}
}
{/jq}
{jq}
//We were having problems with the menu disapearing when you selected an input, this prevents the menu from going away once you have put focus on an input
var hasFocus = false;
var loginPopup = $('.siteloginbar_popup .cssmenu_horiz')

loginPopup.find('ul')
	.mouseout(function() {
		return !hasFocus;
	});

loginPopup.find(':input')
	.focus(function() {
		hasFocus = true;
	})
	.blur(function() {
		hasFocus = false;
	});
{/jq}
{jq}
$("#loginbox-{{$module_logo_instance}}").submit( function () {
	if ($("#login-user_{{$module_logo_instance}}").val() && $("#login-pass_{{$module_logo_instance}}").val()) {
		return true;
	} else {
		$("#login-user_{{$module_logo_instance}}").focus();
		return false;
	}
});
{/jq}
{if !isset($tpl_module_title)}{assign var=tpl_module_title value="{tr}Log in{/tr}"}{/if}{* Left for performance, since tiki-login_scr.php includes this template directly. *}
{if !isset($module_params)}{assign var=module_params value=' '}{/if}
{tikimodule error=$module_params.error title=$tpl_module_title name="login_box" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle}
	{if $mode eq "header"}<div class="siteloginbar{if $user} logged-in{/if}">{/if}
	{if $user}
		{if empty($mode) or $mode eq "module"}
			<div>{tr}Logged in as:{/tr} <span style="white-space: nowrap">{$user|userlink}</span></div>
			<div style="text-align: center;">
				{button href="tiki-logout.php" _text="{tr}Log out{/tr}"}
			</div>
			{if $tiki_p_admin eq 'y'}
				<form action="{if $prefs.https_login eq 'encouraged' || $prefs.https_login eq 'required' || $prefs.https_login eq 'force_nocheck'}{$base_url_https}{/if}{$prefs.login_url}" method="post"{if $prefs.desactive_login_autocomplete eq 'y'} autocomplete="off"{/if}>
					<fieldset>
						<legend>{tr}Switch User{/tr}</legend>
						<label for="login-switchuser_{$module_logo_instance}">{tr}Username:{/tr}</label>
						<input type="hidden" name="su" value="1" />
						{if $prefs.feature_help eq 'y'}
							{help url="Switch+User" desc="{tr}Help{/tr}" desc="{tr}Switch User:{/tr}{tr}Enter user name and click 'Switch'.<br />Useful for testing permissions.{/tr}"}
						{/if}<commit_msg>[ENH] Allow for nobox and style when needed<commit_after>{* $Id$ *}
{jq notonready=true}
function capLock(e, el){
	kc = e.keyCode ? e.keyCode : e.which;
	sk = e.shiftKey ? e.shiftKey : (kc == 16 ? true : false);
	if ((kc >= 65 && kc <= 90 && !sk) || (kc >= 97 && kc <= 122 && sk)) {
		$('.divCapson', $(el).parents('div:first')).show();
	} else {
		$('.divCapson', $(el).parents('div:first')).hide();
	}
}
{/jq}
{jq}
//We were having problems with the menu disapearing when you selected an input, this prevents the menu from going away once you have put focus on an input
var hasFocus = false;
var loginPopup = $('.siteloginbar_popup .cssmenu_horiz')

loginPopup.find('ul')
	.mouseout(function() {
		return !hasFocus;
	});

loginPopup.find(':input')
	.focus(function() {
		hasFocus = true;
	})
	.blur(function() {
		hasFocus = false;
	});
{/jq}
{jq}
$("#loginbox-{{$module_logo_instance}}").submit( function () {
	if ($("#login-user_{{$module_logo_instance}}").val() && $("#login-pass_{{$module_logo_instance}}").val()) {
		return true;
	} else {
		$("#login-user_{{$module_logo_instance}}").focus();
		return false;
	}
});
{/jq}
{if !isset($tpl_module_title)}{assign var=tpl_module_title value="{tr}Log in{/tr}"}{/if}{* Left for performance, since tiki-login_scr.php includes this template directly. *}
{if !isset($module_params)}{assign var=module_params value=' '}{/if}
{if isset($nobox)}{$module_params.nobox = $nobox}{/if}
{if isset($style)}{$module_params.style = $style}{/if}
{tikimodule error=$module_params.error title=$tpl_module_title name="login_box" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle style=$module_params.style}
	{if $mode eq "header"}<div class="siteloginbar{if $user} logged-in{/if}">{/if}
	{if $user}
		{if empty($mode) or $mode eq "module"}
			<div>{tr}Logged in as:{/tr} <span style="white-space: nowrap">{$user|userlink}</span></div>
			<div style="text-align: center;">
				{button href="tiki-logout.php" _text="{tr}Log out{/tr}"}
			</div>
			{if $tiki_p_admin eq 'y'}
				<form action="{if $prefs.https_login eq 'encouraged' || $prefs.https_login eq 'required' || $prefs.https_login eq 'force_nocheck'}{$base_url_https}{/if}{$prefs.login_url}" method="post"{if $prefs.desactive_login_autocomplete eq 'y'} autocomplete="off"{/if}>
					<fieldset>
						<legend>{tr}Switch User{/tr}</legend>
						<label for="login-switchuser_{$module_logo_instance}">{tr}Username:{/tr}</label>
						<input type="hidden" name="su" value="1" />
						{if $prefs.feature_help eq 'y'}
							{help url="Switch+User" desc="{tr}Help{/tr}" desc="{tr}Switch User:{/tr}{tr}Enter user name and click 'Switch'.<br />Useful for testing permissions.{/tr}"}
						{/if}
{'fraction_non_alphanumeric': 0.20615269180266366, 'fraction_numerical': 0.004501969611705121, 'mean_word_length': 5.214452214452215, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '1866824', 'n_tokens_mistral': 2094, 'n_tokens_neox': 1937, 'n_words': 413}