<div>
	<!-- modal toggle-->
	<button class="btn btn-secondary ldap-search-tool" data-toggle="modal" data-target="#ldap-modal" ng-disabled="!search.isConnected()">
		<ion-icon name="search-circle-outline"></ion-icon> <span lmsg="admin.ldap.text.search_tool_label">LDAP Search Tool</span>
	</button>

	<!-- modal -->
	<div id="ldap-modal" class="modal fade" role="dialog">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h5 class="modal-title" lmsg="admin.ldap.text.search_tool_label">LDAP Search Tool</h5>
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">
							<ion-icon name="close-outline"></ion-icon>
						</span>
					</button>
				</div>

				<div class="modal-body">
					<form>
						<div class="form-group row">
							<label class="col-md-2 col-form-label" for="base-dn" lmsg="admin.ldap.text.search_tool_basedn_label">Base DN</label>
							<div class="col-md-10">
								<input id="base-dn" ng-model="search.properties.baseDN" type="text" placeholder="" class="form-control input-md">
							</div>
						</div>
						<div class="form-group row">
							<label class="col-md-2 col-form-label" for="base-dn-filter" lmsg="admin.ldap.text.search_tool_filter_label">Filter</label>
							<div class="col-md-10">
								<input id="base-dn-filter" ng-model="search.properties.filter" type="text" placeholder="" class="form-control input-md">
							</div>
						</div>
						<div class="form-group row">
							<label class="col-md-2 col-form-label" for="run-search"></label>
							<div class="col-md-10">
								<button id="run-search" class="btn btn-primary" ng-click="search.run()" lmsg="admin.ldap.text.run_button">Run</button>
							</div>
						</div>
					</form>
					<div class="ldap-search-result card-body card bg-light">
							<pre class="text-wrap" ng-bind="search.properties.results"></pre>
					</div>
					<button class="btn btn-secondary ldap-search-tool mt-3" data-toggle="modal" data-target="#ldap-modal" ng-click="search.newWindow()">
						<ion-icon name="search-circle-outline"></ion-icon>
						<span lmsg="admin.ldap.text.openwindow_label">Open in New window</span>
					</button>
				</div>
			</div>
		</div>
	</div>
</div>
