reloadInvitationType: function()

in teamcity-invitations-plugin-server/src/main/resources/buildServerResources/invitationsAdmin.js [72:95]


    reloadInvitationType: function (projectId, show) {
        var chooser = $("invitationType");

        var that = this;
        var dialog = $j(that.getContainer());

        var submitButton = dialog.find(".submitButton");
        submitButton.prop("disabled", true);

        if (show) {
            that.showCentered();
        } else {
            that.recenterDialog();
        }

        if (this.formElement().token.value || this.formElement().invitationType.value) {
            var progress = submitButton.siblings(".progressRing").show();
            dialog.find(".content").load(window['base_uri'] + "/admin/invitations.html", "token=" + this.formElement().token.value + "&invitationType=" + encodeURIComponent(this.formElement().invitationType.value) + "&projectId=" + projectId, function () {
                progress.hide();
                submitButton.prop("disabled", false);
                that.recenterDialog();
            });
        }
    }