Skip to content

Commit fc38a9f

Browse files
committed
added loader to webfinger function
1 parent 65e5476 commit fc38a9f

File tree

1 file changed

+10
-1
lines changed
  • uma-server-webapp/src/main/webapp/resources/js

1 file changed

+10
-1
lines changed

uma-server-webapp/src/main/webapp/resources/js/policy.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,12 @@ var PolicyFormView = Backbone.View.extend({
450450

451451
var email = $('#email', this.el).val();
452452

453-
var base = $('base').attr('href');
453+
$('#loadingbox').sheet('show');
454+
$('#loading').html(
455+
'Looking up identity provider...'
456+
);
457+
458+
var base = $('base').attr('href');
454459
$.getJSON(base + '/api/emailsearch?' + $.param({'identifier': email}), function(data) {
455460

456461
// grab the current state of the scopes checkboxes just in case
@@ -462,10 +467,14 @@ var PolicyFormView = Backbone.View.extend({
462467
}, {trigger: false});
463468

464469
_self.render();
470+
471+
$('#loadingbox').sheet('hide');
465472

466473
}).error(function(jqXHR, textStatus, errorThrown) {
467474
console.log("An error occurred when doing a webfinger lookup", errorThrown);
468475

476+
$('#loadingbox').sheet('hide');
477+
469478
//Display an alert with an error message
470479
$('#modalAlert div.modal-header').html($.t('policy.webfinger-error'));
471480
$('#modalAlert div.modal-body').html($.t('policy.webfinger-error-description', {email: email}));

0 commit comments

Comments
 (0)