<tal:block tal:define="zmscontext python:here.getSelf();">
<div id="ZCatalogConnector" tal:define="zcatalogs python:here.getDocumentElement().objectValues(['ZCatalog'])" tal:condition="python:len(zcatalogs)>0">
	<div class="form-group row">
		<label class="col-sm-2 control-label" for="zcatalog_objectIds"><span>Catalogs</span></label>
		<div class="col-sm-10">
			<div tal:repeat="si zcatalogs">
				<label>
					<span class="btn btn-secondary">
						<input type="checkbox" name="zcatalog_objectIds:list" tal:attributes="value python:si.id" />
					</span>
					&nbsp;<a tal:attributes="href python:'%s/manage_main'%si.absolute_url()" target="_blank" tal:content="python:'%s (%s)'%(si.id,here.getZMILangStr(si.meta_type))">id (meta_type)</a>
				</label>
			</div>
			<div>
				<button name="btn" type="submit" class="btn btn-secondary" value="Remove">
					<span class="icon icon-times text-danger"></span>
					Remove
				</button>
			</div>
		</div>
	</div><!-- .form-group -->
	<div class="form-group row">
		<label class="col-sm-2 control-label" for="qsearch"><span>Query</span></label>
		<div class="col-sm-10">
			<div class="input-group">
				<input type="text" class="form-control" id="qsearch" name="q" tal:attributes="value python:request.get('q','*')">
				<div class="input-group-append">
					<button class="btn btn-primary" 
						tal:attributes="onclick python:'javascript:$ZMI.iframe(\'%s/search_xml\',{q:$(\'#ZCatalogConnector #qsearch\').val()},{iframe:true,title:\'ZCatalog: Select\'});;return false'%(here.absolute_url())"
						><i class="fas fa-external-link-alt"></i></button>
				</div>
			</div>
		</div>
	</div><!-- .form-group -->
	<div class="form-group row">
		<label class="col-sm-2 control-label" for="qsuggest"><span>Suggest</span></label>
		<div class="col-sm-10">
			<div class="input-group">
				<input type="text" class="form-control" id="qsuggest" name="q" tal:attributes="value python:request.get('q','*')">
				<div class="input-group-append">
					<button class="btn btn-primary"
						tal:attributes="onclick python:'javascript:$ZMI.iframe(\'%s/suggest_xml\',{q:$(\'#ZCatalogConnector #qsuggest\').val()},{iframe:true,title:\'ZCatalog: Suggest\'});;return false'%(here.absolute_url())"
						><i class="fas fa-external-link-alt"></i></button>
				</div>
			</div>
		</div>
	</div><!-- .form-group -->
</div>
</tal:block>