{extends file="layout.html"}
{block name=title}LMS: {$layout.pagetitle|striphtml}{/block}
{block name=module_content}
<!--// $Id$ //-->
<H1>{$layout.pagetitle}</H1>

<form name="search" id="search" method="POST" action="?m=netdevsearch&search=1">
	<input type="submit" class="hiddenbtn">
</form>

<table class="lmsbox">
	<colgroup>
		<col style="width: 1%;">
		<col style="width: 1%;">
		<col style="width: 98%;">
	</colgroup>
	<thead>
		<tr>
			<td colspan="3">
				<strong>{trans("Find devices matching the following search criteria")}</strong>
			</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				{icon name="netdevice"}
			</td>
			<td class="nobr">
				<strong>{trans("Name")}</strong>
			<td>
				<input type="text" name="search[name]" value="" form="search"
					{tip text="Enter device name or it's fragment"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="producer"}
			</td>
			<td class="nobr">
				<strong>{trans("Manufacturer")}</strong>
			</td>
			<td>
				<input type="text" name="search[producer]" value="" form="search"
					{tip text="Enter producer name or it's fragment"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="model"}
			</td>
			<td class="nobr">
				<strong>{trans("Model")}</strong>
			</td>
			<td>
				<input type="text" name="search[model]" value="" form="search"
					{tip text="Enter device model or it's fragment"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="serialnumber"}
			</td>
			<td class="nobr">
				<strong>{trans("Serial number")}</strong>
			</td>
			<td>
				<input type="text" name="search[serialnumber]" value="" form="search"
					{tip text="Enter device serial number or it's fragment"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="port"}
			</td>
			<td class="nobr">
				<strong>{trans("Number of ports")}</strong>
			</td>
			<td>
				<input type="text" name="search[ports]" value="" form="search"
					{tip text="Enter number of ports"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="location"}
			</td>
			<td class="nobr">
				<strong>{trans("Location")}</strong>
			</td>
			<td>
				<input type="text" name="search[location]" value="" form="search"
					{tip text="Enter device location or it's fragment"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="description"}
			</td>
			<td class="nobr">
				<strong>{trans("Description")}</strong>
			</td>
			<td>
				<input type="text" name="search[description]" value="" form="search"
					{tip text="Enter additional information"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="routed"}
			</td>
			<td class="nobr">
				<strong>{trans("IP address")}</strong>
			</td>
			<td>
				<input type="text" name="search[ipaddr]" value="" form="search"
					{tip text="Enter IP address or it's fragment"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="mac"}
			</td>
			<TD class="nobr">
				<strong>{trans("MAC address")}</strong>
			</td>
			<td>
				<input type="text" name="search[mac]" value="" form="search"
					{tip text="Enter MAC address or it's fragment"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="netdevice"}
			</td>
			<td class="nobr">
				<strong>{trans("Existing links")}</strong>
			</td>
			<td>
				<select size="1" name="search[linktechnology]" form="search"
					class="lms-ui-advanced-select-test show-group-labels">
					<option value="-1">{trans("— any —")}</option>
					<option value="-2">{trans("— without technology —")}</option>
					<option value="-3">{trans("<!netlink>— none —")}</option>
					{foreach $_LINKTYPES as $linktype => $linktypelabel}
						<optgroup label="{$linktypelabel}">
							{foreach $_LINKTECHNOLOGIES[$linktype] as $linktechnologyidx => $linktechnology}
								<option value="{$linktechnologyidx}">{$linktechnology}</option>
							{/foreach}
						</optgroup>
					{/foreach}
				</select>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="qualification-operator"}
			</td>
			<td class="nobr">
				<strong>{trans("Qualification operator")}</strong>
			</td>
			<td>
				<label>
					<input class="radio light" type="radio" value="AND" form="search" name="k"{if $k != 'OR'} checked{/if}>
					{trans("and")}
				</label>
				<label>
					<input class="radio light" type="radio" value="OR" form="search" name="k"{if $k == 'OR'} checked{/if}>
					{trans("or")}
				</label>
			</td>
		</tr>
		<tr>
			<td colspan="3" class="lms-ui-box-buttons">
				{button icon="search" label="Search" onclick="document.search.submit();" form="search"}
				{button icon="cancel" label="Cancel" href="?m=netdevlist"}
			</td>
		</tr>
	</tbody>
</table>

<script>

	document.forms['search'].elements['search[name]'].focus();

</script>
{/block}
