diff options
Diffstat (limited to 'templates/sysconfig')
-rw-r--r-- | templates/sysconfig/ad-checkconnection.html | 50 | ||||
-rw-r--r-- | templates/sysconfig/ad-checkcredentials.html | 67 | ||||
-rw-r--r-- | templates/sysconfig/ad-start.html | 7 |
3 files changed, 100 insertions, 24 deletions
diff --git a/templates/sysconfig/ad-checkconnection.html b/templates/sysconfig/ad-checkconnection.html index 17064db0..1c3a1091 100644 --- a/templates/sysconfig/ad-checkconnection.html +++ b/templates/sysconfig/ad-checkconnection.html @@ -3,8 +3,7 @@ </p> <div id="zeug"> - <div data-tm-id="{{self-search}}" data-tm-log="messages" data-tm-callback="selfCb">LDAP Self-Query</div> - <div data-tm-id="{{tm-search}}" data-tm-log="messages" data-tm-callback="ldapCb">LDAP Test-Query</div> + <div data-tm-id="{{taskid}}" data-tm-log="messages" data-tm-callback="portScan">Port Check</div> </div> <br> <div class="pull-left"> @@ -16,46 +15,49 @@ <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 role="form" method="post" action="?do=SysConfig&action=addmodule&step={{step}}"> + <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 id="setdn" name="binddn" value="{{binddn}}" 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_skip}} »</button> + <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 ldapCb(task) - { - if (!task || !task.statusCode) - return; - if (task.statusCode === 'TASK_FINISHED') { - $('#nextbutton').html('Weiter »').show(); - } - if (task.statusCode === 'TASK_ERROR' || task.statusCode === 'PARENT_FAILED') { - $('#nextbutton').html('Trotzdem weiter »'); - } - if (task.statusCode === 'TASK_ERROR') { - $('#nextbutton').show(); - } - } - function selfCb(task) + function portScan(task) { if (!task || !task.statusCode) return; - if (task.statusCode === 'TASK_FINISHED' && task.data && task.data.dn) { - $('#setdn').val(task.data.dn); - } else { - $('#nextbutton').html('Trotzdem weiter »'); + 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> diff --git a/templates/sysconfig/ad-checkcredentials.html b/templates/sysconfig/ad-checkcredentials.html new file mode 100644 index 00000000..e8b472c1 --- /dev/null +++ b/templates/sysconfig/ad-checkcredentials.html @@ -0,0 +1,67 @@ +<p> + {{lang_connectionWait}} +</p> + +<div id="zeug"> + <div data-tm-id="{{self-search}}" data-tm-log="messages" data-tm-callback="selfCb">LDAP Self-Query</div> + <div data-tm-id="{{tm-search}}" data-tm-log="messages" data-tm-callback="ldapCb">LDAP Test-Query</div> +</div> +<br> +<div class="pull-left"> + <form role="form" method="post" action="?do=SysConfig&action=addmodule&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 name="ssl" value="on" type="hidden"> + {{/ssl}} + <button type="submit" class="btn btn-primary">« {{lang_back}}</button> + </form> +</div> +<div class="pull-right"> + <form 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 name="searchbase" value="{{searchbase}}" type="hidden"> + <input id="setdn" 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"> + {{/ssl}} + <input name="originalbinddn" value="{{binddn}}" type="hidden"> + <button id="nextbutton" type="submit" class="btn btn-primary" style="display:none">{{lang_skip}} »</button> + </form> +</div> +<script type="text/javascript"> + function ldapCb(task) + { + if (!task || !task.statusCode) + return; + if (task.statusCode === 'TASK_FINISHED') { + $('#nextbutton').html('Weiter »').show(); + } + if (task.statusCode === 'TASK_ERROR' || task.statusCode === 'PARENT_FAILED') { + $('#nextbutton').html('Trotzdem weiter »'); + } + if (task.statusCode === 'TASK_ERROR') { + $('#nextbutton').show(); + } + } + function selfCb(task) + { + if (!task || !task.statusCode) + return; + if (task.statusCode === 'TASK_FINISHED' && task.data && task.data.dn) { + $('#setdn').val(task.data.dn); + } else { + $('#nextbutton').html('Trotzdem weiter »'); + } + } +</script> diff --git a/templates/sysconfig/ad-start.html b/templates/sysconfig/ad-start.html index 587f15af..8ce92c25 100644 --- a/templates/sysconfig/ad-start.html +++ b/templates/sysconfig/ad-start.html @@ -54,6 +54,13 @@ </span> </div> <br> + <div class="checkbox"> + <label> + <input type="checkbox" name="ssl" {{#ssl}}checked{{/ssl}}> {{lang_ssl}} + </label> + </div> + <div><i>{{lang_sslDescription}}</i></div> + <br> <div class="pull-right"> <button type="submit" class="btn btn-primary">{{lang_next}} »</button> </div> |