summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorMax Wu2017-01-09 00:49:40 +0800
committerGitHub2017-01-09 00:49:40 +0800
commitb13635aac9d42996d0ac9b9b7dcbdf94102c7abe (patch)
tree966bdbdd4a359311eae02a86144df8a4307aafb2 /public
parent23a12dd927b66880fa991b377d450455851b69a9 (diff)
parent94abfaba7c5b7655eda3d6547144adfa26c90a5f (diff)
Merge pull request #279 from alecdwm/ldap-auth
Support for LDAP server authentication
Diffstat (limited to '')
-rw-r--r--public/views/index.ejs4
-rw-r--r--public/views/signin-modal.ejs29
2 files changed, 29 insertions, 4 deletions
diff --git a/public/views/index.ejs b/public/views/index.ejs
index f8eaeaa8..55c13d2d 100644
--- a/public/views/index.ejs
+++ b/public/views/index.ejs
@@ -57,7 +57,7 @@
<% if (errorMessage && errorMessage.length > 0) { %>
<div class="alert alert-danger" style="max-width: 400px; margin: 0 auto;"><%= errorMessage %></div>
<% } %>
- <% if(facebook || twitter || github || gitlab || dropbox || google || email) { %>
+ <% if(facebook || twitter || github || gitlab || dropbox || google || ldap || email) { %>
<span class="ui-signin">
<br>
<a type="button" class="btn btn-lg btn-success ui-signin" data-toggle="modal" data-target=".signin-modal" style="min-width: 170px;"><%= __('Sign In') %></a>
@@ -97,7 +97,7 @@
</div>
<div id="history" class="section"<% if(!signin) { %> style="display:none;"<% } %>>
- <% if(facebook || twitter || github || gitlab || dropbox || google || email) { %>
+ <% if(facebook || twitter || github || gitlab || dropbox || google || ldap || email) { %>
<div class="ui-signin">
<p><%= __('Below is the history from browser') %></p>
</div>
diff --git a/public/views/signin-modal.ejs b/public/views/signin-modal.ejs
index 58d8a690..7c52e0f3 100644
--- a/public/views/signin-modal.ejs
+++ b/public/views/signin-modal.ejs
@@ -38,7 +38,32 @@
<i class="fa fa-google"></i> <%= __('Sign in via %s', 'Google') %>
</a>
<% } %>
- <% if((facebook || twitter || github || gitlab || dropbox || google) && email) { %>
+ <% if((facebook || twitter || github || gitlab || dropbox || google) && ldap) { %>
+ <hr>
+ <% }%>
+ <% if(ldap) { %>
+ <h4>Via LDAP</h4>
+ <form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
+ <div class="form-group">
+ <div class="col-sm-12">
+ <input type="username" class="form-control" name="username" placeholder="Username" required>
+ <span class="help-block control-label with-errors" style="display: inline;"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-12">
+ <input type="password" class="form-control" name="password" placeholder="Password" required>
+ <span class="help-block control-label with_errors" style="display: inline;"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-12">
+ <button type="submit" class="btn btn-primary" formaction="<%- url %>/auth/ldap">Sign in</button>
+ </div>
+ </div>
+ </form>
+ <% } %>
+ <% if((facebook || twitter || github || gitlab || dropbox || google || ldap) && email) { %>
<hr>
<% }%>
<% if(email) { %>
@@ -67,4 +92,4 @@
</div>
</div>
</div>
-</div> \ No newline at end of file
+</div>