summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js2
-rw-r--r--public/views/shared/signin-modal.ejs21
2 files changed, 21 insertions, 2 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 1330deac..3dd25fa6 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1479,7 +1479,7 @@ $('#snippetExportModalConfirm').click(function () {
file_name: $('#snippetExportModalFileName').val(),
code: editor.getValue(),
visibility_level: $('#snippetExportModalVisibility').val(),
- visibility: $('#snippetExportModalVisibility').val() === 0 ? 'private' : ($('#snippetExportModalVisibility').val() === 10 ? 'internal' : '')
+ visibility: $('#snippetExportModalVisibility').val() === '0' ? 'private' : ($('#snippetExportModalVisibility').val() === '10' ? 'internal' : 'private')
}
if (!data.title || !data.file_name || !data.code || !data.visibility_level || !$('#snippetExportModalProjects').val()) return
diff --git a/public/views/shared/signin-modal.ejs b/public/views/shared/signin-modal.ejs
index f0cffad9..b413511c 100644
--- a/public/views/shared/signin-modal.ejs
+++ b/public/views/shared/signin-modal.ejs
@@ -78,7 +78,26 @@
</div>
</form>
<% } %>
- <% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || oauth2) && email) { %>
+ <% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || oauth2) && openID) { %>
+ <hr>
+ <% }%>
+ <% if(openID) { %>
+ <h4>OpenID</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="text" class="form-control" name="openid_identifier" placeholder="OpenID" 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/openid">Sign in</button>
+ </div>
+ </div>
+ </form>
+ <% } %>
+ <% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || oauth2 || openID) && email) { %>
<hr>
<% }%>
<% if(email) { %>