<xf:title>{{ phrase('search_templates') }}</xf:title>

<xf:form action="{{ link('templates/search') }}" class="block">

	<div class="block-container">
		<div class="block-body">
			<xf:macro id="style_macros::style_select"
				arg-styleTree="{$styleTree}"
				arg-styleId="{$styleId}" />

			<xf:selectrow name="type" selected="public"
				label="{{ phrase('template_type') }}">

				<xf:foreach loop="$types" key="$typeId" value="$type">
					<xf:option value="{$typeId}">{$type}</xf:option>
				</xf:foreach>
			</xf:selectrow>

			<xf:macro id="addon_macros::addon_select"
				arg-addOnId="_any"
				arg-includeAny="{{ true }}"
				arg-emptyValue="_none" />

			<hr class="formRowSep" />

			<xf:textboxrow name="title"
				label="{{ phrase('title_contains') }}"
				dir="ltr" />

			<xf:formrow rowtype="input"
				label="{{ phrase('template_contains') }}">

				<ul class="inputList">
					<li><xf:textarea name="template" autosize="true" code="true" /></li>
					<li><xf:checkbox standalone="true"><xf:option name="template_cs" label="{{ phrase('case_sensitive') }}" /></xf:checkbox></li>
				</ul>
			</xf:formrow>

			<hr class="formRowSep" />

			<xf:checkboxrow name="state[]"
				label="{{ phrase('template_status') }}">

				<xf:option value="default" selected="1">{{ phrase('unmodified') }}</xf:option>
				<xf:option value="inherited" selected="1">{{ phrase('modified_in_parent_style') }}</xf:option>
				<xf:option value="custom" selected="1">{{ phrase('modified_in_this_style') }}</xf:option>
			</xf:checkboxrow>
		</div>
		<xf:submitrow sticky="true" icon="search" />
	</div>
	<xf:hiddenval name="search">1</xf:hiddenval>

</xf:form>