diff options
Diffstat (limited to 'templates/sysconfig/ldap-checkconnection.html')
-rw-r--r-- | templates/sysconfig/ldap-checkconnection.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/templates/sysconfig/ldap-checkconnection.html b/templates/sysconfig/ldap-checkconnection.html new file mode 100644 index 00000000..39408526 --- /dev/null +++ b/templates/sysconfig/ldap-checkconnection.html @@ -0,0 +1,65 @@ +<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&action=addmodule&step=LdapAuth_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">« {{lang_back}}</button> + </form> +</div> +<div class="pull-right"> + <form id="nextform" role="form" method="post" action="?do=SysConfig&action=addmodule&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}} »</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)) { + if ($.isNumeric($('#port').val()) && $('#port').val() < ports[i].port) continue; // Prefer the global LDAP ports + $('#port').val(ports[i].port); + if (ssl) $('#fingerprint').val(ports[i].certFingerprint); + } + } + if ($('#port').val() > 0) { + $('#nextbutton').show(); + $('#nextform').submit(); + } + } + } +</script> |