The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 8881fe41 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Fix Recaptcha error in Lightbox and move advanced title functionality over from Bootstrap 3.

parent dc6027bb
No related merge requests found
......@@ -91,7 +91,17 @@ var Lightbox = {
changeContent: function(html, headline) {
var header = $('#modal .modal-header');
if(typeof headline !== "undefined") {
header.html(headline);
var h2 = html.match(/<h2>([^<]*)<\/h2>/);
if(h2) {
header.find('.modal-title').html(h2[1]);
} else {
var pLead = html.match(/<p class="lead[^>]*>([^<]*)<\/p>/);
if(pLead) {
header.find('.modal-title').html(pLead[1]);
}
}
} else {
header.find('.modal-title').html(headline);
}
if(header.find('h3').html().length == 0) {
header.css('border-bottom-width', '0');
......@@ -187,7 +197,7 @@ var Lightbox = {
$('#modal .modal-body').prepend('<div class="alert alert-error">'+message+'</div>');
}
$('.icon-spinner').remove();
if (Recaptcha && Recaptcha.widget) {
if (typeof Recaptcha !== "undefined" && Recaptcha.widget) {
Recaptcha.reload();
}
},
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment