added loader to webfinger function
parent
65e5476c66
commit
fc38a9f65d
|
@ -450,6 +450,11 @@ var PolicyFormView = Backbone.View.extend({
|
||||||
|
|
||||||
var email = $('#email', this.el).val();
|
var email = $('#email', this.el).val();
|
||||||
|
|
||||||
|
$('#loadingbox').sheet('show');
|
||||||
|
$('#loading').html(
|
||||||
|
'Looking up identity provider...'
|
||||||
|
);
|
||||||
|
|
||||||
var base = $('base').attr('href');
|
var base = $('base').attr('href');
|
||||||
$.getJSON(base + '/api/emailsearch?' + $.param({'identifier': email}), function(data) {
|
$.getJSON(base + '/api/emailsearch?' + $.param({'identifier': email}), function(data) {
|
||||||
|
|
||||||
|
@ -463,9 +468,13 @@ var PolicyFormView = Backbone.View.extend({
|
||||||
|
|
||||||
_self.render();
|
_self.render();
|
||||||
|
|
||||||
|
$('#loadingbox').sheet('hide');
|
||||||
|
|
||||||
}).error(function(jqXHR, textStatus, errorThrown) {
|
}).error(function(jqXHR, textStatus, errorThrown) {
|
||||||
console.log("An error occurred when doing a webfinger lookup", errorThrown);
|
console.log("An error occurred when doing a webfinger lookup", errorThrown);
|
||||||
|
|
||||||
|
$('#loadingbox').sheet('hide');
|
||||||
|
|
||||||
//Display an alert with an error message
|
//Display an alert with an error message
|
||||||
$('#modalAlert div.modal-header').html($.t('policy.webfinger-error'));
|
$('#modalAlert div.modal-header').html($.t('policy.webfinger-error'));
|
||||||
$('#modalAlert div.modal-body').html($.t('policy.webfinger-error-description', {email: email}));
|
$('#modalAlert div.modal-body').html($.t('policy.webfinger-error-description', {email: email}));
|
||||||
|
|
Loading…
Reference in New Issue