codimd/public/views/shared/signin-modal.ejs

101 lines
5.6 KiB
Plaintext
Raw Normal View History

<!-- signin modal -->
<div class="modal fade signin-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"><%= __('Choose method') %></h4>
</div>
<div class="modal-body" style="text-align: center;">
<% if(facebook) { %>
<a href="<%- url %>/auth/facebook" class="btn btn-lg btn-block btn-social btn-facebook">
<i class="fa fa-facebook"></i> <%= __('Sign in via %s', 'Facebook') %>
</a>
<% } %>
<% if(twitter) { %>
<a href="<%- url %>/auth/twitter" class="btn btn-lg btn-block btn-social btn-twitter">
<i class="fa fa-twitter"></i> <%= __('Sign in via %s', 'Twitter') %>
</a>
<% } %>
<% if(github) { %>
<a href="<%- url %>/auth/github" class="btn btn-lg btn-block btn-social btn-github">
<i class="fa fa-github"></i> <%= __('Sign in via %s', 'GitHub') %>
</a>
<% } %>
2016-05-21 14:48:00 +00:00
<% if(gitlab) { %>
<a href="<%- url %>/auth/gitlab" class="btn btn-lg btn-block btn-social btn-soundcloud">
<i class="fa fa-gitlab"></i> <%= __('Sign in via %s', 'GitLab') %>
2016-05-21 14:48:00 +00:00
</a>
<% } %>
2017-10-29 10:16:40 +00:00
<% if(mattermost) { %>
<a href="<%- url %>/auth/mattermost" class="btn btn-lg btn-block btn-social btn-soundcloud">
<i class="fa fa-mattermost"></i> <%= __('Sign in via %s', 'Mattermost') %>
</a>
<% } %>
<% if(dropbox) { %>
<a href="<%- url %>/auth/dropbox" class="btn btn-lg btn-block btn-social btn-dropbox">
<i class="fa fa-dropbox"></i> <%= __('Sign in via %s', 'Dropbox') %>
</a>
<% } %>
2016-05-21 14:48:00 +00:00
<% if(google) { %>
<a href="<%- url %>/auth/google" class="btn btn-lg btn-block btn-social btn-google">
<i class="fa fa-google"></i> <%= __('Sign in via %s', 'Google') %>
</a>
<% } %>
2017-10-29 10:16:40 +00:00
<% if((facebook || twitter || github || gitlab || mattermost || 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>
<% } %>
2017-10-29 10:16:40 +00:00
<% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap) && email) { %>
<hr>
<% }%>
<% if(email) { %>
<h4>Via Email</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="email" class="form-control" name="email" placeholder="Email" 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 %>/login">Sign in</button>
2017-01-12 03:25:58 +00:00
<% if(allowemailregister) { %><button type="submit" class="btn btn-default" formaction="<%- url %>/register">Register</button><% }%>
</div>
</div>
</form>
<% }%>
</div>
</div>
</div>
</div>