diff options
author | Yukai Huang | 2017-01-13 22:53:33 +0800 |
---|---|---|
committer | Yukai Huang | 2017-01-13 22:53:33 +0800 |
commit | 3d6b31921651e71ef68fdc88af4ddef50cc9bcb3 (patch) | |
tree | 8ba3e2a5e57a5d54be071475a96b20f78957eff2 /public/views | |
parent | 3566d71aea5486709f73ba7fac5a421993b41f00 (diff) | |
parent | 3cf40a8dec96af3710a5945dde693fdc949f31af (diff) |
Merge branch 'master' into frontend-next
Diffstat (limited to 'public/views')
-rw-r--r-- | public/views/body.ejs | 2 | ||||
-rw-r--r-- | public/views/index.ejs | 4 | ||||
-rw-r--r-- | public/views/signin-modal.ejs | 31 |
3 files changed, 32 insertions, 5 deletions
diff --git a/public/views/body.ejs b/public/views/body.ejs index 83a82fa3..5ad1733e 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -17,7 +17,9 @@ <ul class="dropdown-menu" aria-labelledby="permissionLabel"> <li class="ui-permission-freely"<% if(!allowAnonymous) { %> style="display: none;"<% } %>><a><i class="fa fa-leaf fa-fw"></i> Freely - Anyone can edit</a></li> <li class="ui-permission-editable"><a><i class="fa fa-shield fa-fw"></i> Editable - Signed people can edit</a></li> + <li class="ui-permission-limited"><a><i class="fa fa-id-card fa-fw"></i> Limited - Signed people can edit (forbid guest)</a></li> <li class="ui-permission-locked"><a><i class="fa fa-lock fa-fw"></i> Locked - Only owner can edit</a></li> + <li class="ui-permission-protected"><a><i class="fa fa-umbrella fa-fw"></i> Protected - Only owner can edit (forbid guest)</a></li> <li class="ui-permission-private"><a><i class="fa fa-hand-stop-o fa-fw"></i> Private - Only owner can view & edit</a></li> <li class="divider"></li> <li class="ui-delete-note"><a><i class="fa fa-trash-o fa-fw"></i> Delete this note</a></li> diff --git a/public/views/index.ejs b/public/views/index.ejs index fe900673..b1a1feb4 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -58,7 +58,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> @@ -98,7 +98,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..a8af62e7 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 <% if (ldap.providerName) { %> <%- ldap.providerName %> (LDAP) <% } else { %> 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) { %> @@ -59,7 +84,7 @@ <div class="form-group"> <div class="col-sm-12"> <button type="submit" class="btn btn-primary" formaction="<%- url %>/login">Sign in</button> - <button type="submit" class="btn btn-default" formaction="<%- url %>/register">Register</button> + <% if(allowemailregister) { %><button type="submit" class="btn btn-default" formaction="<%- url %>/register">Register</button><% }%> </div> </div> </form> @@ -67,4 +92,4 @@ </div> </div> </div> -</div>
\ No newline at end of file +</div> |