summaryrefslogblamecommitdiffstats
path: root/templates/sysconfig/ad-checkconnection.html
blob: 1c3a10915bad810f450f3d36c500351847a415fe (plain) (tree)
1
2
3
4
5
6
7
8
9
   
                               


               
                                                                                                        


                       
                                                                                                          
                                                                    
                                                                    



                                                                              
                                                                  


                                                                    
                                                                                            


                        
                                                                                                                    
                                                                    
                                                                  
                                                                    
                                                                      
                                                                    
                                                                              
                                                                      
                                                                      
                                                                  



                                                                                  
                                                                              
                                                                                                                                 

               
                    
                               
                               


                                              











                                                                                                                       
                 
         
         
<p>
	{{lang_connectionWait}}
</p>

<div id="zeug">
	<div data-tm-id="{{taskid}}" data-tm-log="messages" data-tm-callback="portScan">Port Check</div>
</div>
<br>
<div class="pull-left">
	<form role="form" method="post" action="?do=SysConfig&amp;action=addmodule&amp;step=AdAuth_Start">
		<input type="hidden" name="token" value="{{token}}">
		<input name="title" value="{{title}}" type="hidden">
		<input name="server" value="{{server}}" type="hidden">
		<input name="searchbase" value="{{searchbase}}" type="hidden">
		<input name="binddn" value="{{binddn}}" type="hidden">
		<input name="bindpw" value="{{bindpw}}" type="hidden">
		<input name="home" value="{{home}}" type="hidden">
		{{#ssl}}
		<input id="ssl" name="ssl" value="on" type="hidden">
		{{/ssl}}
		<button type="submit" class="btn btn-primary">&laquo; {{lang_back}}</button>
	</form>
</div>
<div class="pull-right">
	<form id="nextform" role="form" method="post" action="?do=SysConfig&amp;action=addmodule&amp;step={{step}}">
		<input type="hidden" name="token" value="{{token}}">
		<input type="hidden" name="edit" value="{{edit}}">
		<input name="title" value="{{title}}" type="hidden">
		<input name="server" value="{{server}}" type="hidden">
		<input id="port" name="port" value="" type="hidden">
		<input name="searchbase" value="{{searchbase}}" type="hidden">
		<input name="binddn" value="{{binddn}}" type="hidden">
		<input name="bindpw" value="{{bindpw}}" type="hidden">
		<input name="home" value="{{home}}" type="hidden">
		{{#ssl}}
		<input name="ssl" value="on" type="hidden">
		<input id="fingerprint" name="fingerprint" value="" type="hidden">
		{{/ssl}}
		<input name="originalbinddn" value="{{binddn}}" type="hidden">
		<button id="nextbutton" type="submit" class="btn btn-primary" style="display:none">{{lang_next}} &raquo;</button>
	</form>
</div>
<div id="bla"></div>
<script type="text/javascript">
	function portScan(task)
	{
		if (!task || !task.statusCode)
			return;
		if (task.statusCode === 'TASK_FINISHED' && task.data && task.data.ports) {
			var ssl = $('#ssl').length > 0;
			var ports = task.data.ports;
			for (var i = 0; i < ports.length; ++i) {
				if (ports[i].open && ports[i].port && (!ssl || ports[i].certFingerprint.length > 10)) {
					$('#port').val(ports[i].port);
					if (ssl) $('#fingerprint').val(ports[i].certFingerprint);
					$('#nextbutton').show();
					$('#nextform').submit();
					return;
				}
			}
		}
	}
</script>