summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
Diffstat (limited to 'public/views')
-rw-r--r--public/views/index.ejs5
-rw-r--r--public/views/signin-ldap-modal.ejs35
-rw-r--r--public/views/signin-modal.ejs10
3 files changed, 46 insertions, 4 deletions
diff --git a/public/views/index.ejs b/public/views/index.ejs
index 2bec7de0..baca1417 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>
@@ -93,7 +93,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>
@@ -192,6 +192,7 @@
</div>
</div>
<%- include signin-modal %>
+ <%- include signin-ldap-modal %>
<% if(useCDN) { %>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
diff --git a/public/views/signin-ldap-modal.ejs b/public/views/signin-ldap-modal.ejs
new file mode 100644
index 00000000..6a665f17
--- /dev/null
+++ b/public/views/signin-ldap-modal.ejs
@@ -0,0 +1,35 @@
+<!-- signin ldap modal -->
+<div class="modal fade signin-ldap-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-sm">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
+ </button>
+ <h4 class="modal-title" id="mySmallModalLabel"><%= __('LDAP Sign in') %></h4>
+ </div>
+ <div class="modal-body" style="text-align: center;">
+ <% if(ldap) { %>
+ <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>
+ <% } %>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/public/views/signin-modal.ejs b/public/views/signin-modal.ejs
index acbad256..ba6c57ff 100644
--- a/public/views/signin-modal.ejs
+++ b/public/views/signin-modal.ejs
@@ -38,7 +38,13 @@
<i class="fa fa-google"></i> <%= __('Sign in via %s', 'Google') %>
</a>
<% } %>
- <% if((facebook || twitter || github || gitlab || dropbox || google) && email) { %>
+ <% if(ldap) { %>
+ <a type="button" class="btn btn-lg btn-block btn-social btn-reddit "data-toggle="modal" data-target=".signin-ldap-modal">
+ <i class="fa fa-book"></i> <%= __('Sign in via %s', 'LDAP') %>
+ </a>
+ <% } %>
+
+ <% if((facebook || twitter || github || gitlab || dropbox || google || ldap) && email) { %>
<hr>
<% }%>
<% if(email) { %>
@@ -67,4 +73,4 @@
</div>
</div>
</div>
-</div> \ No newline at end of file
+</div>