free trial: Send users to /upgrade after realm creation.

This commit is contained in:
Vishnu KS
2020-05-22 19:12:46 +05:30
committed by Tim Abbott
parent a5f0379e0f
commit 8784539d53
12 changed files with 242 additions and 3 deletions

View File

@@ -6,11 +6,16 @@ exports.create_ajax_request = function (url, form_name, stripe_token = null, num
const form_error = "#" + form_name + "-error";
const form_loading = "#" + form_name + "-loading";
const zulip_limited_section = "#zulip-limited-section";
const free_trial_alert_message = "#free-trial-alert-message";
loading.make_indicator($(form_loading_indicator),
{text: 'Processing ...', abs_positioned: true});
$(form_input_section).hide();
$(form_error).hide();
$(form_loading).show();
$(zulip_limited_section).hide();
$(free_trial_alert_message).hide();
const data = {};
if (stripe_token) {
@@ -45,6 +50,8 @@ exports.create_ajax_request = function (url, form_name, stripe_token = null, num
$(form_loading).hide();
$(form_error).show().text(JSON.parse(xhr.responseText).msg);
$(form_input_section).show();
$(zulip_limited_section).show();
$(free_trial_alert_message).show();
},
});
};