<commit_before>{* $Id$ *}
{if $tiki_p_create_file_galleries eq 'y' or (not empty($user) and $user eq $gal_info.user and $gal_info.type eq 'user' and $tiki_p_userfiles eq 'y')}
	{if isset($individual) and $individual eq 'y'}
		{remarksbox type="tip" title="{tr}Permissions{/tr}"}
			{tr}There are individual permissions set for this file gallery{/tr}. {permission_link mode=icon type="file gallery" permType="file galleries" id=$galleryId title=$name label="{tr}Manage Permissions{/tr}"}
		{/remarksbox}
	{/if}
	<form class="form-horizontal" role="form" action="{$smarty.server.PHP_SELF}?{query}" method="post">
		<input type="hidden" name="galleryId" value="{$galleryId|escape}">
		<input type="hidden" name="filegals_manager" {if isset($filegals_manager)}value="{$filegals_manager}"{/if}>

		{tabset name="list_file_gallery"}
			{tab name="{tr}Properties{/tr}"}
				<h2>{tr}Properties{/tr}</h2><br>
				<div class="form-group">
					<label for="name" class="col-sm-4 control-label">{tr}Name{/tr}</label>
					<div class="col-sm-8">
						<p class="form-control-static">
							{if $galleryId eq $treeRootId or $gal_info.type eq 'user'}
								<b>{tr}{$gal_info.name}{/tr}</b>
								<input type="hidden" name="name" value="{$gal_info.name|escape}" class="form-control">
							{else}
								<input type="text" id="name" name="name" value="{$gal_info.name|escape}" class="form-control">
								<span class="help-block">{tr}Required for podcasts{/tr}.</span>
							{/if}
						</p>
					</div>
				</div>
				{if $prefs.feature_file_galleries_templates eq 'y'}
					<div class="form-group">
						<label for="fgal_template" class="col-sm-4 control-label">{tr}Template{/tr}</label>
						<div class="col-sm-8">
							<select name="fgal_template" id="fgal_template" class="form-control">
								<option value=""{if !isset($templateId) or $templateId eq ""} selected="selected"{/if}>{tr}None{/tr}</option>
								{foreach from=$all_templates key=key item=item}
									<option value="{$item.id}"{if $gal_info.template eq $item.id} selected="selected"{/if}>{$item.label|escape}</option>
								{/foreach}
								{jq}
$('#fgal_template').change( function() {
var otherTabs = $('span.tabinactive');
var otherParams = $('#description').parents('tr').nextAll('tr');

if ($(this).val() != '') {
	// Select template, hide parameters
	otherTabs.hide();
	otherParams.hide();
} else {
	// No template, show parameters
	otherTabs.show();
	otherParams.show();
}
}).change();
								{/jq}
							</select>
						</div>
					</div>
				{/if}
				<div class="form-group">
					<label for="fgal_type" class="col-sm-4 control-label">{tr}Type{/tr}</label>
					<div class="col-sm-8"><commit_msg>[FIX] Template field change handler Must have broken migrating to Bootstrap<commit_after>{* $Id$ *}
{if $tiki_p_create_file_galleries eq 'y' or (not empty($user) and $user eq $gal_info.user and $gal_info.type eq 'user' and $tiki_p_userfiles eq 'y')}
	{if isset($individual) and $individual eq 'y'}
		{remarksbox type="tip" title="{tr}Permissions{/tr}"}
			{tr}There are individual permissions set for this file gallery{/tr}. {permission_link mode=icon type="file gallery" permType="file galleries" id=$galleryId title=$name label="{tr}Manage Permissions{/tr}"}
		{/remarksbox}
	{/if}
	<form class="form-horizontal" role="form" action="{$smarty.server.PHP_SELF}?{query}" method="post">
		<input type="hidden" name="galleryId" value="{$galleryId|escape}">
		<input type="hidden" name="filegals_manager" {if isset($filegals_manager)}value="{$filegals_manager}"{/if}>

		{tabset name="list_file_gallery"}
			{tab name="{tr}Properties{/tr}"}
				<h2>{tr}Properties{/tr}</h2><br>
				<div class="form-group">
					<label for="name" class="col-sm-4 control-label">{tr}Name{/tr}</label>
					<div class="col-sm-8">
						<p class="form-control-static">
							{if $galleryId eq $treeRootId or $gal_info.type eq 'user'}
								<b>{tr}{$gal_info.name}{/tr}</b>
								<input type="hidden" name="name" value="{$gal_info.name|escape}" class="form-control">
							{else}
								<input type="text" id="name" name="name" value="{$gal_info.name|escape}" class="form-control">
								<span class="help-block">{tr}Required for podcasts{/tr}.</span>
							{/if}
						</p>
					</div>
				</div>
				{if $prefs.feature_file_galleries_templates eq 'y'}
					<div class="form-group">
						<label for="fgal_template" class="col-sm-4 control-label">{tr}Template{/tr}</label>
						<div class="col-sm-8">
							<select name="fgal_template" id="fgal_template" class="form-control">
								<option value=""{if !isset($templateId) or $templateId eq ""} selected="selected"{/if}>{tr}None{/tr}</option>
								{foreach from=$all_templates key=key item=item}
									<option value="{$item.id}"{if $gal_info.template eq $item.id} selected="selected"{/if}>{$item.label|escape}</option>
								{/foreach}
								{jq}
$('#fgal_template').change( function() {
var otherTabs = $('ul.nav-tabs li:not(.active)');
var otherParams = $('#description').parents('div.form-group').nextAll('div.form-group');

if ($(this).val() != '') {
	// Select template, hide parameters
	otherTabs.hide();
	otherParams.hide();
} else {
	// No template, show parameters
	otherTabs.show();
	otherParams.show();
}
}).change();
								{/jq}
							</select>
						</div>
					</div>
				{/if}
				<div class="form-group">
					<label for="fgal_type" class="col-sm-4 control-label">{tr}Type{/tr}</label>
					<div class="col-sm-8">
{'fraction_non_alphanumeric': 0.2028534845436254, 'fraction_numerical': 0.0029266508139747576, 'mean_word_length': 4.237547892720307, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, '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': '645481', 'n_tokens_mistral': 2297, 'n_tokens_neox': 1898, 'n_words': 372}