<br class="space5" />

{if $filtersList}

	<table class="list" width="100%" style="margin:0px">

		{******************************************************************************************}
		{********************************* TABLE HEADER *******************************************}
		{******************************************************************************************}

		<tr>
			<th width="1%">#</th>
			<th width="20%" class="nowrap">{$_LANG.reportsManagement.admin.filters.th.filter}</th>
			<th width="1%" class="nowrap">
				{$_LANG.reportsManagement.admin.filters.th.visible}
			</th>
			<th colspan="2">{$_LANG.reportsManagement.admin.filters.th.default}</th>
		</tr>

		{foreach from=$filtersList key=filter item=filterDet}

			<tr class="{cycle values="odd,even"}">

				<td class="nowrap">{counter name="filtersList"}.</td>

				<td class="nowrap">
					<label for="visibleFilter_{$filter}" class="hand">
						{$filterDet.originalName}
						{if $filterDet.mandatory}<sup class="importantFilter">*</sup>{/if}
					</label>
				</td>

				<td class="nowrap center sel">
					<input id="visibleFilter_{$filter}" type="checkbox" class="noBorder"
						name="filters[{$filter}][v]" value="1"  {if $filterDet.visible}checked="1"{/if}
					/>
				</td>

				<td>

					{* === FILTER TYPE = TEXT ================================================== *}
					{if $filterDet.type=='text'}
						{include file="index_stepContent_filters_text.tpl"}
					{/if}

					{* === FILTER TYPE = DATE INTERVAL ========================================= *}
					{if $filterDet.type=='dateInterval'}
						{include file="index_stepContent_filters_dateInterval.tpl"}
					{/if}

					{* === FILTER TYPE = CHECKBOX ============================================== *}
					{if $filterDet.type=='checkbox'}
						{include file="index_stepContent_filters_checkbox.tpl"}
					{/if}

					{* === FILTER TYPE = AUTOCOMPLETE ========================================== *}
					{if $filterDet.type=='autocomplete'}
						{include file="index_stepContent_filters_autocomplete.tpl"}
					{/if}

					{* === FILTER TYPE = SERVICES SIMPLE ======================================= *}
					{if $filterDet.type=='servicesSimple'}
						{include file="index_stepContent_filters_servicesSimple.tpl"}
					{/if}

					{* === FILTER TYPE = SERVICES ADVANCED ===================================== *}
					{*if $filterDet.type=='servicesAdvanced'}
						{include file="index_stepContent_filters_servicesAdvanced.tpl"}
					{/if*}
					
					{* === FILTER TYPE = SELECT ================================================ *}
					{if $filterDet.type=='select'}
						{include file="index_stepContent_filters_select.tpl"}
					{/if}
					
					{* === FILTER TYPE = SELECT MULTIPLE ======================================= *}
					{if $filterDet.type=='selectMultiple'}
						{include file="index_stepContent_filters_selectMultiple.tpl"}
					{/if}

				</td>

				<td>
					<a href="#;" class="icon-infoBlue help"

						{if $filterDet.type=='text'}
							tooltip="{$_LANG.reportsManagement.admin.filters.info_text}"
						{/if}

						{if $filterDet.type=='dateInterval'}
							tooltip="{$_LANG.reportsManagement.admin.filters.info_dateInterval}"
						{/if}

						{if $filterDet.type=='checkbox'}
							tooltip="{$_LANG.reportsManagement.admin.filters.info_checkbox}"
						{/if}

						{if $filterDet.type=='autocomplete'}
							tooltip="{$_LANG.reportsManagement.admin.filters.info_autocomplete}"
						{/if}

						{*if $filterDet.type=='servicesAdvanced'}
							tooltip="{$_LANG.reportsManagement.admin.filters.info_servicesAdvanced}"
						{/if*}

						{if $filterDet.type=='servicesSimple'}
							tooltip="{$_LANG.reportsManagement.admin.filters.info_servicesSimple}"
						{/if}

						{if $filterDet.type=='select'}
							tooltip="{$_LANG.reportsManagement.admin.filters.info_select}"
						{/if}
						
						{if $filterDet.type=='selectMultiple'}
							{if $filterDet.data=='corporateGroups'}
								tooltip="{$_LANG.reportsManagement.admin.filters.info_selectMultipleCorporateGroups}"
							{else}
								tooltip="{$_LANG.reportsManagement.admin.filters.info_selectMultipleDefault}"
							{/if}
						{/if}
					></a>
				</td>

			</tr>

		{/foreach}

	</table>

{/if}