Commit Graph

6463 Commits

Author SHA1 Message Date
Tim Abbott ee9a9bfa98 css: Remove unused btn-block styles.
The (unfinished) two-factor UI isn't designed at all, so we can just
remove the classes from it.
2024-01-25 18:35:38 -08:00
Lauryn Menard f6ef2d860b plans-template: Show end date of legacy plan for push notifications.
Because we can now extend the end date for legacy self-hosted plans,
instead of hard-coding the generic end date in the plans template,
show the specific end date for the current legacy plan.
2024-01-23 14:22:20 -08:00
Lauryn Menard fca9ff1ae7 support: Show date for start of next billing cycle for current plan.
Instead of showing the next invoice date for the plan, show the
date for the next billing cycle start (e.g. the next plan renewal
charge date), except for plans currently on a free trial.

For plans on a free trial, the next plan renewal date will be when
the free trial ends, which is stored as the next invoice date on
the plan.
2024-01-22 10:09:00 -08:00
Alya Abbott bbe138fd0e billing: Qualify policies for free and discounted plans. 2024-01-19 18:15:27 -08:00
Lauryn Menard 536aef854c remote-activity: Display rows for remote realms.
Adds columns for remote realm ID, name and organization type. If
a remote server has remote realms attached that are not marked
as deactivated by the remote server, then there will be a row in
the chart for each remote realm (which duplicates some remote
server data).

Updates the plan data, revenue and user counts to be for the realm
if present and otherwise for the server.

Updates the user counts to be total users and guest users, instead
of non guest and guest users.

The total row for mobile data (users and pushes forwarded) sums
each remote server's data once, so while the column duplicates
data, the total row should be an accurate total for the installation.

Adds 5 queries to the remote activity page test. One is for the
additional query for the remote realm plans. The other four are
getting the remote realm object and then the user count data for
the two remote realms in the test.
2024-01-19 11:46:13 -08:00
swayam0322 684101353f find_account: Add button to send another email.
The result page didn't have any resend button a button was
added to redirect to the form where the user can find their
account

Fixes part of #3128
2024-01-19 09:02:03 -08:00
Mateusz Mandera 649b4885e8 remote_billing: Add rate-limiting for confirmation email sending.
These should be rate-limited by both IP using our regular
sends_email_by_ip bucket as well as by server, using a new bucket
dedicated to this.
2024-01-18 12:06:16 -08:00
Alya Abbott 57b5be6c91 billing: Rename button to apply for sponsorship or discount.
It was not clear that the button could be used for discounts.
2024-01-18 08:33:08 -08:00
Aman Agrawal 633f64a79e narrow: Use message list id to track message lists in DOM.
This removes use of zfilt and zhome from codebase.
2024-01-18 08:31:48 -08:00
Alya Abbott 91ee0bf676 emails: Remove organization type from sponsorship request emails.
This makes the subject nicer for replying to these emails.
2024-01-17 16:44:06 -08:00
Lauryn Menard 030f899195 realm-activity: Merge chart for human and bot users.
Merges the two charts remaining to have just one chart for the
realm activity view.

Removes the columns for different clients and adds a column to
show/sort by the user type (human or bot type).

Deletes templates/analytics/activity.html because it is no
longer used for any activity pages/views.
2024-01-16 09:43:42 -08:00
Karl Stolley 906559c2b5 portico: Extend proper background gradients to /plans. 2024-01-15 18:43:33 -08:00
Karl Stolley cc4bb3493a portico: Scope pricing-plans styles to pages that need it. 2024-01-15 18:43:33 -08:00
Mateusz Mandera 100cef9186 templates: Move remote_realm_server_mismatch_error.html to zerver.
This is rendered by regular self-hosted servers, so doesn't belong in
zilencer.
2024-01-15 16:50:48 -08:00
Lauryn Menard a5f2883a75 remote-support: Add ability to set a required plan tier for customer. 2024-01-15 03:10:04 -08:00
Prakhar Pratyush 11908c4c2e stripe: Add cron-based plan invoicing to remote realm billing system. 2024-01-14 15:47:55 -08:00
Tim Abbott 40f99d0990 Revert "portico: Extend proper background gradients to /plans."
This reverts commit 536d2f4e7f.

Apparently pricing_plans.css is included in many unrelated pages.
2024-01-12 14:43:28 -08:00
Aman Agrawal 03254bea5b billing: Change how flat discount on billing/upgrade page is displayed. 2024-01-12 08:50:51 -08:00
Aman Agrawal 618cce03d6 plans: Only show 2-month free notification notice for legacy servers. 2024-01-12 08:50:51 -08:00
Aman Agrawal c9a4660911 header: Avoid using `.dropdown` for class name.
This is avoid conflict with styles defined for `.dropdown` in
bootstrap.
2024-01-12 08:40:51 -08:00
Aman Agrawal 9d1e977e2a portico: Don't use `dropdown-toggle` class.
We want to avoid using `dropdown-toggle` class to avoid
properties leaking from bootstrap.
2024-01-12 08:40:51 -08:00
Alex Vandiver e0bd169c77 docs: Fix other help pages that were renamed or moved, to save a redirect. 2024-01-11 13:52:12 -08:00
Alex Vandiver c217280c23 docs: Fix help links for pm -> dm rename, to save a redirect. 2024-01-11 13:52:12 -08:00
Alex Vandiver eefe147c34 web: Fix links which were missing trailing slashes. 2024-01-11 13:52:12 -08:00
Lauryn Menard 787d64e327 support: Update validation for adding or updating a discount.
Updates the HTML input field to have a min of 0, max of 99.99 and
allow increments of 0.01.

Also, use format_discount_percentage for displaying the customer
default discount in the support form.
2024-01-11 09:20:41 -08:00
Karl Stolley de00e44fb0 plans: Link to cloud, self-hosted sponsorship areas. 2024-01-10 15:10:04 -08:00
sanchi-t 0a626f5e3c csrf_failure: Update error page.
Switches from Django's default error page to Zulip standard error
template.  Also updates template for 405 error code to not use the 404
art.

Fixes #25626.
2024-01-10 09:49:24 -08:00
afeefuddin d0deaff7fd portico-header: Dropped find accounts link for smaller windows.
Fixes #27477
2024-01-09 16:46:24 -08:00
Alya Abbott d790b28322 billing: Improve /plans and billing help pages.
- Clarify sponsorship policies.
- Explain how paid self-hosted plans fund the Zulip project.
2024-01-09 16:03:55 -08:00
ecxtacy b771c34493 dev: Restructure devlogin page link.
Relocate the `developer tools` link from bottom to the top.
Edit the sentence appropriately.
2024-01-09 10:42:47 -08:00
Lauryn Menard 2994685399 support: Add admin support for updating end date of active plan.
This currently will only apply to tier.SELF_HOSTED_LEGACY plans.
2024-01-09 10:13:21 -08:00
Aman Agrawal 37c1b88917 stripe: Only enable free trial for basic plan. 2024-01-08 14:41:22 -08:00
Aman Agrawal 398c889ce1 plans: Ask customer to contact sales to switch plan tier. 2024-01-08 14:41:22 -08:00
Aman Agrawal ad093e851b plans: Don't show discount for customers on a non-legacy plan.
Only new customers and customers on legacy plan
are eligible for discount.
2024-01-08 14:41:22 -08:00
Aman Agrawal 3cb1ebeb34 plans: Align price with `details` when no discount is applied. 2024-01-08 14:41:22 -08:00
Karl Stolley 536d2f4e7f portico: Extend proper background gradients to /plans. 2024-01-08 14:15:37 -08:00
Alex Vandiver 9c336e4374 documentation: Support having no sidebar for policies docs.
We document the sidebar as being optional, so make it so.
2024-01-07 19:11:16 -08:00
Lauryn Menard 63dd057298 support: Include mobile users and mobile push data.
Adds the count for mobile users and mobile pushes forwarded to
the remote support view for both servers and realms.
2024-01-05 16:55:38 -08:00
Lauryn Menard 92ebeb7baa support: Add a link to remote server's installation analytics page. 2024-01-05 16:55:38 -08:00
Karl Stolley 9fde83c161 billing: Add Cloud comparison table. 2024-01-04 18:46:05 -08:00
Alya Abbott a4ad0ae2b1 portico: Improve link to Azure AD doc for /plans/#self-hosted. 2024-01-04 18:42:26 -08:00
Lauryn Menard fb29a35262 support: Add updating minimum licenses requirement after discount.
Adds a support action for updating the minimum licenses on a
customer object once a default discount has also been set.

In the case that the current billing entity has a current active
plan or a scheduled upgrade to a new plan, then the minimum
licenses will not be updated.
2024-01-04 18:42:07 -08:00
Alya Abbott 2a57aa6cea billing: Improve display of sponsorship requests. 2024-01-04 12:25:30 -08:00
Lauryn Menard b4b44e5558 support: Display remote realm is deactivated fields.
Also updates populate_billing_realms to not locally deactivate
test remote realms when generating them.
2024-01-03 14:40:11 -08:00
Lauryn Menard 4143101637 remote-activity: Display latest audit log update for remote server.
Since the latest end time for reported active users on a remote
server is not used to determine if a remote server has current
data for billing purposes, we instead display the last audit log
update datetime for the remote server object.

Removes the note in the remote activity key about the Zulip
version.

Also adds a sum in the total row for mobile push notifications
sent.
2024-01-03 12:15:35 -08:00
Lauryn Menard 67e77ad370 integrations: Simplify instruction for generating incoming webhook URL.
As the help center article now has detailed instructions to generate
an incoming webhook URL, the integration documentation only needs to
link to that information.
2024-01-03 10:47:39 -08:00
Lauryn Menard ea1da738d6 support: Update how remote server information is organized.
Changes the emoji that highlights when a remote realm or server has
an active discount.

Adds a remote server UUID field to the remote server information.

Moves the 'has remote realms' field to be after the Zulip version
information, and adds an extra break there to visually highlight
that field as well as the following 'max monthly messages' field.
2024-01-02 13:16:35 -08:00
Lauryn Menard b9ca60ab9e support: Add date created field to remove server information.
Removes the last updated field and replaces it with the date the
remote server was created based on the audit log data.
2024-01-02 13:16:35 -08:00
Lauryn Menard ffd708ecaf support: Display next plan data on remote support view.
Currently, this will only be the case for legacy self-managed plans
that have scheduled a switch to either the Basic or Business plan.
2023-12-30 11:22:02 -08:00
Anders Kaseorg 9703b4d70b login: Remove external_authentication_methods from page_params.
This was used by a work-in-progress social login implementation in
zulip-desktop that was reverted for security reasons and never
released.

https://github.com/zulip/zulip/pull/13782
https://github.com/zulip/zulip-desktop/pull/863

We replaced it by a secure implementation with a maintainable API.

https://github.com/zulip/zulip-desktop/pull/943

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-29 13:02:12 -08:00
Alya Abbott 9e67a273b6 help: Improve documentation on automatic and manual license management. 2023-12-20 23:09:21 -08:00
Alya Abbott 37e408a428 help: Update self hosted billing documentation to add Basic plan. 2023-12-20 23:09:21 -08:00
Aman Agrawal e192aef23d billing: Apply a flat discount for self hosted plans. 2023-12-20 23:09:21 -08:00
Aman Agrawal 0337c726d3 plans: Align basic plan price detail at bottom. 2023-12-20 23:09:21 -08:00
Karl Stolley a37354f92a corporate: Add a Basic plan. 2023-12-20 23:09:21 -08:00
Alya Abbott 9d5105557d portico: Tweak discount eligibility description. 2023-12-20 23:09:21 -08:00
Lauryn Menard 22e035d8e2 support: Fix description for remote realm host field. 2023-12-19 14:44:26 -08:00
Lauryn Menard ad8daffb62 support: Add Zulip version to remote server information.
In the remote server information displayed in the remote support
view, show the Zulip version currently on the RemoteZulipServer
object as last_version.
2023-12-19 14:44:26 -08:00
Lauryn Menard 9e9fec68a1 support: Add plan's estimated annual revenue to remote support view.
Also fixes formatting for per license price and moves the billing
schedule to be above this line so that it's clearer the per license
price is based on the billing schedule.
2023-12-19 14:44:26 -08:00
Lauryn Menard fb3bd0cde1 support: Add user count data to remote support view. 2023-12-19 14:44:26 -08:00
Lauryn Menard a8172591ca support: Show current discount for current plan.
This should match any discount information shown for the remote
realm or server.
2023-12-19 14:44:26 -08:00
Lauryn Menard be6c90f608 support: Move and highlight current sponsorship information.
Moves the note about being on the sponsored Community plan to be
under the remote server or realm name.

Adds a note about a remote server or realm with a partial discount
set, which is another type of sponsorship.

Highlights these notes visually with emojis for support admin.
2023-12-19 14:44:26 -08:00
Anders Kaseorg 125ddf2f79 self-hosting: Fix link to redirect.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-18 16:11:35 -08:00
Aman Agrawal b2faa5c5bb stripe: Add a CustomerPlan for self hosted sponsored customers. 2023-12-18 12:55:34 -08:00
Aman Agrawal d962814a30 upgrade: Make it possible to upgrade to a provided tier.
Main work is maintaining context during various redirects and
and passing the context to the final upgrade process.
2023-12-18 12:23:46 -08:00
Aman Agrawal 1326619b77 stripe: Provide min license count to template as per tier. 2023-12-18 12:23:46 -08:00
Aman Agrawal 311a645c5a sponsorship_request: Minor changes.
* Show if requested org is hosted on Zulip Cloud.
* Change how user numbers are displayed.
2023-12-17 09:33:37 -08:00
Tim Abbott 1e0339c18b plans: Fix community plan documentation.
It appears the plans page version of this had a less clear/specific
list of example communities than was intended. Also improve the longer
version in the Help Center to give the same examples.
2023-12-17 00:09:06 -08:00
Aman Agrawal 6b1f71872b plans: Fix same page hashtag link.
Fixes /plans fragment links redirecting users to different page.
2023-12-16 22:51:21 -08:00
Alya Abbott 910a8169bc billing: Don't ask about subscriptions when deactivating registration. 2023-12-15 14:04:20 -05:00
Karl Stolley e44ba3b1f1 portico: Add new self-hosted plans.
Co-authored-by: Alya Abbott <alya@zulip.com>
2023-12-15 11:03:42 -08:00
Karl Stolley 92de3d11d2 portico: Add self-hosted plans comparison table.
Co-authored-by: Vlad Korobov <vlad.korobov@zulip.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2023-12-15 11:03:42 -08:00
Karl Stolley d25c375be9 billing: Show self-hosted help link for licenses. 2023-12-15 11:03:42 -08:00
Karl Stolley 6d48e08ff7 portico: Update modal for canceling scheduled legacy upgrade. 2023-12-15 11:03:42 -08:00
Karl Stolley 5d7010c8a0 billing: Update copy, modal for self-hosted downgrades and trials. 2023-12-15 11:03:42 -08:00
Karl Stolley 356d775d31 billing: Clarify minimum purchase license numbers. 2023-12-15 11:03:42 -08:00
Aman Agrawal b377673190 sponsorship: Add help link redirect for org_type dropdown.
Only visible for self hosted orgs.
2023-12-15 11:03:42 -08:00
Aman Agrawal 8fb126505c sponsorship: Show different discount text for self hosted orgs. 2023-12-15 11:03:42 -08:00
Tim Abbott 9423ccecd4 docs: Document plan management login tips. 2023-12-15 11:03:42 -08:00
Alya Abbott 2090a10aad portico: Remove development environment testing plan. 2023-12-15 11:03:42 -08:00
Tim Abbott ace8344b5a docs: Document manual update_analytics_counts. 2023-12-15 10:13:35 -08:00
Aman Agrawal 4b5e8971a3 sponsorship_approval: Fix punctuation. 2023-12-15 09:08:48 -08:00
Aman Agrawal f5aa88e165 billing: Don't show current license for legacy plan customers. 2023-12-15 08:10:16 -08:00
Alya Abbott ba80084ea7
remote_billing_page: Deny login for server / remote realm.
If server has plan, deny login for realm.
If realm has plan, deny login for server.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2023-12-14 14:25:12 -08:00
Lauryn Menard 83d6481f6f support: Add the remote realm's plan type to the support view.
The plan type for the remote realm is useful to compare to any
current plan attached to the same remote realm.
2023-12-14 11:38:02 -08:00
Alya Abbott b8d05aea1b portico: Update count of Tim's daughters on /team page. 2023-12-14 11:33:57 -08:00
Tim Abbott 1757b88760 billing: Offer release announcement subscriptions.
Also avoid prompting for full name time more than once.
Adds TOS version field to Remote server user.

Co-authored-by: Karl Stolley <karl@zulip.com>
Co-authored-by: Aman Agrawal <amanagr@zulip.com>
2023-12-14 10:51:16 -08:00
Aman Agrawal 34a1be80a4 model: Use same name for legacy plan across the app. 2023-12-14 08:22:25 -08:00
Lauryn Menard a897d68d93 support: Add active plan information to remote server activity.
Adds three columns to the remote server activity chart and updates
the chart key for the third of those columns.

The first is the plan name. If there are multiple plans with a
status under the live threshhold, then we send "See support view".

The second is the plan status. If there are multiple plans, then
we send "Multiple plans".

The third is the estimated annual revenue for the plan. Note that
for free trials, this will be calculated as if the plan was paid
for 12 months (so a full year).

If there is no plan for the server under the live threshold or at
all then "---" is inserted into the table row. Note that 100%
sponsored servers/realms would fall into this category.
2023-12-13 13:43:00 -08:00
Karl Stolley 09c32cbe30 Revert "portico: Disable self-hosted tab for logged-in cloud users."
This reverts commit 857630707a.
2023-12-13 12:23:02 -08:00
Lauryn Menard 68d117e60a support: Add sponsorship request information to remote support view. 2023-12-13 10:28:11 -08:00
Lauryn Menard e8500fbdb0 support: Include sponsorship request for remote server support view.
Preparation for updating the sponsorship forms template to include
information about the latest sponsorship request if sponsorship is
pending.
2023-12-13 10:28:11 -08:00
Aman Agrawal 039f6af79e billing: Link plan name to /plans page. 2023-12-13 08:13:33 -08:00
Aman Agrawal 998685f2e7 sponsorship: Show sponsored plan name for sponsored orgs.
The `plan_name` is incorrect here since the customer will not
have an active plan for approved sponsorship.
2023-12-13 08:13:33 -08:00
Aman Agrawal 63f4fc51de server_deactivate: Show error message for server on active plan. 2023-12-12 21:00:42 -08:00
Aman Agrawal c2636354a5 remote_billing_login: Show different title for deactivate login. 2023-12-12 21:00:42 -08:00
Aman Agrawal 0d08fe90a8 remote_billing_email_confirm: Minor text changes.
* Move email early in text to reduce change of it wrapping to
  next line.

* Change 2 hours to 24 hours.
2023-12-12 20:32:42 -08:00
Karl Stolley 180dd00d5f portico: Update strings for RemoteRealm login flow. 2023-12-12 20:32:42 -08:00
Lauryn Menard aebafcc43f corporate: Show error page if mobile push data has not been uploaded.
Adds a template that displays an error message when the billing
or upgrade context for a remote server or remote realm raises a
MissingDataError.
2023-12-12 19:36:06 -08:00
Aman Agrawal da74b9ade7 billing: Apply common styles to billing pages. 2023-12-12 17:31:41 -08:00
Karl Stolley 9cc0ded092 portico: Correct layout on deactivation pages. 2023-12-12 17:31:41 -08:00
Karl Stolley 2b879e646c portico: Move billing contact to above payment method. 2023-12-12 16:24:56 -08:00
Alya Abbott a2f72edc68 email: Update strings in remote_realm log in confirmation email. 2023-12-12 14:51:00 -08:00
Mateusz Mandera e515574b3e remote_billing: Add endpoint and a helper to make deactivation links.
This is a general link for logging into the billing system on behalf of
a server, but it's tied to the .contact_email and takes the user
straight to the /deactivate/ page via the next_page mechanism.
2023-12-12 13:31:59 -08:00
Aman Agrawal 2e8aba2e83 billing: Show special success msg for legacy upgrade scheduled server. 2023-12-12 11:45:14 -08:00
Karl Stolley 857630707a portico: Disable self-hosted tab for logged-in cloud users. 2023-12-12 11:30:57 -08:00
Aman Agrawal c61275cab2 upgrade: Show sponsorship requested banner like billing page. 2023-12-12 09:30:17 -08:00
Aman Agrawal cf68f8ae24 legacy_server_logic: Rename id and key variable names.
Rename server_org_id to zulip_org_id.
Rename server_org_secret/server_org_key to zulip_org_key.
2023-12-12 08:05:45 -08:00
Aman Agrawal ab1a8a0151 legacy_server_login: Do better error handling.
Show better error messages and validate zulip_org_id in JS before
sending it to the server and give an appropriate error message.
2023-12-12 08:05:45 -08:00
Lauryn Menard 89c2740342 support: Fix references to remote server in `remote_realm_details.html`. 2023-12-12 08:04:02 -08:00
Aman Agrawal 2da1bfcbd0 remote_billing: Fix strings and styling for remote login pages. 2023-12-11 20:16:37 -08:00
Alya Abbott fd97d87491 help: Update development community stream descriptions. 2023-12-11 11:23:21 -08:00
Lauryn Menard 144b2a9988 support: Add forms for current plan actions to remote realms.
Pulls the forms for updating the billing collection method and
generally modifying the current plan to a separate template.

Uses the shared template to render these forms for both the
remote server and any attached remote realms.
2023-12-11 10:33:50 -08:00
Lauryn Menard 6f3e1cf653 support: Add remote realm current plan data to support view. 2023-12-11 10:33:50 -08:00
Lauryn Menard 7186f75b58 support: Add sponsorship/discount support forms to remote realms.
If there are remote realms attached to the remote server, adds
the forms to be able to update sponsorship requests, approve
sponsorship and update a discount.
2023-12-11 10:33:50 -08:00
Lauryn Menard 2684c21cca support: Create separate template for remote sponsorship/discounts.
Creates a separate template for the forms related to sponsorship
and discounts on the remote support view.
2023-12-11 10:33:50 -08:00
Lauryn Menard c2a76ccb3e support: Clean up template variables for remote server support. 2023-12-11 10:33:50 -08:00
Tim Abbott f1ffb1f56e emails: Extend expiration for login confirmation links. 2023-12-11 10:16:40 -08:00
Alya Abbott eb57b4c4f7 emails: Adjust wording in remote realm login link email. 2023-12-11 10:16:40 -08:00
Alya Abbott 9e90afc504 emails: Adjust wording in legacy server login link email. 2023-12-11 10:16:40 -08:00
Karl Stolley 9c66b4a660 portico: Make Cloud tab inactive for self-hosters.
Copy here also points to the Cloud plans as described on zulip.com.
2023-12-11 09:03:00 -08:00
Karl Stolley 851f69c3ba portico: Point Zulip logo to zulip.com for self-hosters. 2023-12-11 09:03:00 -08:00
Karl Stolley c9d2ac1e1b portico: Don't show Find accounts or New org for self-hosters. 2023-12-11 09:03:00 -08:00
Aman Agrawal ac8d5a5f0b remote_billing_page: Show error page for registration mismatch.
When a self-hosted Zulip server does a data export and then import
process into a different hosting environment (i.e. not sharing the
RemoteZulipServer with the original, we'll have various things that
fail where we look up the RemoteRealm by UUID and find it but the
RemoteZulipServer it is associated with is the wrong one.

Right now, we ask user to contact support via an error page but
might develop UI to help user do the migration directly.
2023-12-10 19:33:48 -08:00
Tim Abbott f78db57c6b corporate: Remove temporary billing scaffolding. 2023-12-10 16:46:39 -08:00
Mateusz Mandera a0ea14bdb1 remote_billing: Fold the separate .ts files into remote_billing_auth.ts.
The separation of files no longer makes any sense, with some of these
forms being used by the RemoteRealm and legacy server flows together.
And in general we don't need to scatter this stuff across files.

Also, the unifying of the class of loader on the buttons, fixes a visual
bug on the final "Confirm login" page where you would see it spinning
for half a second upon loading the page, until the .hide() code
triggered.
2023-12-10 16:15:28 -08:00
Mateusz Mandera 1e6d9d28f8 remote_billing: Fix up templates and HTML names in them.
These pages are generally used by both remoterealm and legacy server
flows, so should have general names.
2023-12-10 16:15:28 -08:00
Mateusz Mandera 423aebf98e remote_billing: Implement confirmation flow for RemoteRealm auth.
The way the flow goes now is this:
1. The user initiaties login via "Billing" in the gear menu.
2. That takes them to `/self-hosted-billing/` (possibly with a
   `next_page` param if we use that for some gear menu options).
3. The server queries the bouncer to give the user a link with a signed
   access token.
4. The user is redirected to that link (on `selfhosting.zulipchat.com`).
Now we have two cases, either the user is logging in for the first time
and already did in the past.
If this is the first time, we have:
5. The user is asked to fill in their email in a form that's shown,
   pre-filled with the value provided inside the signed access token.
   They POST this to the next endpoint.
6. The next endpoint sends a confirmation email to that address and asks
   the user to go check their email.
7. The user clicks the link in their email is taken to the
   from_confirmation endpoint.
8. Their initial RemoteBillingUser is created, a new signed link like in
   (3) is generated and they're transparently taken back to (4),
   where now that they have a RemoteBillingUser, they're handled
   just like a user who already logged in before:
If the user already logged in before, they go straight here:
9. "Confirm login" page - they're shown their information (email and
   full_name), can update
   their full name in the form if they want. They also accept ToS here
   if necessary. They POST this form back to
   the endpoint and finally have a logged in session.
10. They're redirected to billing (or `next_page`) now that they have
    access.
2023-12-10 16:15:28 -08:00
Aman Agrawal e44f3d448d stripe: Use `next_plan` instead of `new_plan` for legacy upgrades. 2023-12-09 12:50:05 -08:00
Aman Agrawal dca7e654ca billing: Enforce min license for plan on upgrade and billing page. 2023-12-09 12:50:05 -08:00
Mateusz Mandera abdfdeffe4 remote_billing: Implement confirmation flow for legacy servers.
For the last form (with Full Name and ToS consent field), this pretty
shamelessly re-uses and directly renders the
corporate/remote_realm_billing_finalize_login_confirmation.html
template. That's probably good in terms of re-use, but calls for a
clean-up commit that will generalize the name of this template and the
classes/ids in the HTML.
2023-12-08 23:49:10 -08:00
Aman Agrawal 12dec4234e billing: Minor adjustments across the billing system.
* Reformat "This is a legacy plan" notice on billing page.
* Add a link to the plan name on upgrade page title.
* Tweak discount style on billing page.
* Add line break to server login page title.
* Match server login page title and tab title.
2023-12-08 11:24:15 -08:00
Aman Agrawal 76d9aff5a6 sponsorship: Allow remote orgs to request a plan type.
Sponsorship and billing pages modified to reflect the correctly
requested sponsorship plan name.
Add a line break before "Contact Zulip support".
2023-12-08 11:24:15 -08:00
Aman Agrawal 134a05ff5e billing: Hide license management fields for free trial states.
* For free trial, don't show number of licenses for current billing period.
* For free trial scheduled to downgrade, don't show number of
  licenses for next billing period.
2023-12-08 09:21:18 -08:00
Karl Stolley 8d76231dda portico: Hide Cloud-plan buttons for self-hosters. 2023-12-07 19:19:21 -08:00
Karl Stolley 60a4300db9 portico: Set standalone 'Choose a plan' header for self-hosters. 2023-12-07 19:19:21 -08:00
Karl Stolley e1fab4a55a portico: Hide header/footer on self-hosted /plans. 2023-12-07 19:19:21 -08:00
Aman Agrawal 2165486c88 upgrade: Allow showing downgrade success message for legacy server. 2023-12-07 13:55:39 -08:00
Aman Agrawal 825986ac3a billing: Allow legacy servers to cancel upgrade. 2023-12-07 13:55:39 -08:00
Aman Agrawal 00b7424d11 legacy_server_login: Restyle page. 2023-12-07 13:55:39 -08:00
Aman Agrawal 21e64887f1 plans: Add current plan icon to cloud free current plan. 2023-12-07 13:55:39 -08:00
Lauryn Menard c94c194ea7 corporate: Send email community plan sponsorship approved. 2023-12-07 13:17:14 -08:00
Aman Agrawal 1987894a2d billing: Remove `min` input validation for license input.
Fixes #28040
2023-12-07 08:34:39 -08:00
Aman Agrawal 7cad1f80be sponsorship: Set page title based on sponsorship status.
Fixes #27999
2023-12-07 08:34:39 -08:00
Aman Agrawal a15499fb98 upgrade: Fix upgrade links. 2023-12-06 12:04:10 -08:00
Lauryn Menard 5bae7e5a33 emails: Add new context data to sponsorship requested templates.
Adds the new information from the sponsorship form to the email
sent to support: user counts and description of paid users.
2023-12-06 11:04:54 -08:00
Lauryn Menard 46dab1beb9 emails: Replace string_id from sponsorship request email context.
Use of `string_id` in the sponsorship request email content was
removed in commit d3834f8b9, but it is still used in the email
subject.

Updates the email subject to use the billing_entity_display_name,
which is still the Realm.string_id for Zulip Cloud organizations.

Sets this string as "billing_entity" in the context and subject
template.
2023-12-06 11:04:54 -08:00
Lauryn Menard ea725aaaf3 support: Handle missing current licenses data for support views. 2023-12-06 11:01:26 -08:00
Lauryn Menard d079a13760 support: Use shared template for current plan details on support views.
Moves the section in support views for any current plan details
to a new template: `templates/analytics/current_plan_details.html`.

Also, updates the PlanData dataclass to have a boolean that checks
if the current plan tier is the self-hosted legacy plan.
2023-12-06 11:01:26 -08:00
Aman Agrawal 34730203b3 plans: Show special text for legacy orgs scheduled for upgrade. 2023-12-05 23:44:29 -08:00
Aman Agrawal 8d9a7679bc plans: Show buttons as per current context.
Also show correct tab based on remote / cloud user.
2023-12-05 23:44:29 -08:00
Aman Agrawal 49908ba166 sponsorship: Populate sponsorship page with correct context.
Fixes sponsorship page to work for remote realm and server.
2023-12-05 23:44:29 -08:00
Lauryn Menard ba3279e959 support: Add remote realm stub to remote server information.
Adds a small section for any remote realms attached to the remote
server in the support view.
2023-12-05 12:48:42 -08:00
Lauryn Menard cfd61669e0 support: Add plan type to remote server information.
Updates `get_plan_type_string` for RemoteZulipServer plan types and
capitalizes the strings used for Realm plan types.

Also changes the string for Realm.PLAN_TYPE_STANDARD_FREE to be
"Standard free" instead of "open source" as that is used for any
100% sponsored organization, which is not restricted to open-source
projects.
2023-12-05 12:48:42 -08:00
Lauryn Menard 6c5b419267 support: Add downgrade current plan actions to remote servers. 2023-12-05 12:48:42 -08:00
Lauryn Menard f5ab9419d2 support: Update billing modality for remote server current plan. 2023-12-05 12:48:42 -08:00
Lauryn Menard 9f8fe7989a support: Add current plan information for remote servers.
For remote servers with a current legacy customer plan,
only the plan name, status and end date are displayed.
2023-12-05 12:48:42 -08:00
Mateusz Mandera 250b52e3dc remote_billing: Add a "confirm login" page in RemoteRealm auth flow. 2023-12-05 11:34:57 -08:00
Karl Stolley acbe843b09 portico: Update pricing buttons on business, self-hosting.
This also defaults to the Zulip Cloud plans tab on the business
page.
2023-12-05 11:09:41 -08:00
Karl Stolley 2ea37a54a6 portico: Update plans tab on other pages.
This adds the new tabs from /plans to:

* /for/business
* /self-hosting

And it isolates legacy styles to preserve the tabs on
/for/education

Fixes: #28013
2023-12-05 11:09:41 -08:00
Aman Agrawal 1a063986e3 billing: Render page for legacy server scheduled for upgrade. 2023-12-04 12:36:24 -08:00
Aman Agrawal f22ccd3125 stripe: Render upgrade page for remote servers on legacy plan. 2023-12-04 12:36:24 -08:00
Aman Agrawal 895d76f6f0 hello: Add getapp badge on landing page. 2023-12-03 20:43:07 -08:00
Aman Agrawal a59245e932 billing: Make various buttons on billing page work.
We pass billing_base_url to the template and use it to construct
session specific URLs. Also, add corresponding function on server
to support them.
2023-12-03 15:15:04 -08:00
Aman Agrawal f942bbd70f stripe: Show tier information correctly on billing and upgrade page. 2023-12-03 15:15:04 -08:00
Lauryn Menard c457ef2a07 support: Remove discount/sponsorship actions if remote server sponsored.
Removes the support actions for changing a remote server's default
discount and sponsorship pending states if the remote server is on
the sponsored plan type.
2023-12-03 14:27:07 -08:00
Lauryn Menard 69f6d3dcb1 support: Approve sponsorship for remote server customer.
Adds ability to approve a sponsorship request for a customer
attached to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 2218e667a6 support: Update remote server customer sponsorship pending status.
Adds ability to update the sponsorship pending status of a customer
attached to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 4250e9c1c9 support: Update remote server customer default discount.
Adds ability to update the default discount for a customer attached
to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 1d685bd198 support: Add success message to remote servers support view context. 2023-12-03 14:27:07 -08:00
Lauryn Menard 8d992405a6 analytics: Get customer discount for support views. 2023-12-03 14:27:07 -08:00
Lauryn Menard 6621de6f07 analytics: Add copy email button for remote server support view. 2023-12-03 14:27:07 -08:00
Lauryn Menard 5135acd9e3 support: Use process_support_view_request for plan modifications.
Updates the support view to use process_support_view_request to
process upgrade or downgrade modifications currently implemented
for active plans.
2023-12-03 14:27:07 -08:00
Lauryn Menard 0679bc044a corporate: Make references to billing modality consistent.
The "send_invoice" and "charge_automatically" strings used by stripe
for the `collection_method` are referred to both as the "billing
method" and "billing modality" in the billing code.

Because we send this as data to stripe as either `collection_method`
or `billing_modality`, renames any references that are any form of
"billing method".
2023-12-03 14:27:07 -08:00
Mateusz Mandera 44ac99b8fc remote_billing: Redirect via next_page param in legacy server flow.
Analogical to 1df8e00d7c which implemented
this for the RemoteRealm auth flow.
Except here we don't need to add next_page to the IdentityDict
(LegacyServerIdentityDict in this flow), because the redirect happens
immediately at remote_billing_legacy_server_login upon login - so no
need to have a structure to carry the info through intermediate steps.
2023-12-03 10:39:56 -08:00
Karl Stolley 871054bd1e plans_page: Allow different max-widths on cloud, self-hosted panes. 2023-12-01 15:12:31 -08:00
Karl Stolley 5eb86f3fbb plans_page: Add responsive non-JS plan-pane scrolling. 2023-12-01 15:12:31 -08:00
Karl Stolley 5bfe45b244 plans_page: Implement button styles and icons. 2023-12-01 15:12:31 -08:00
Karl Stolley 8529d86fc6 plans_page: Place custom bullets with flexbox. 2023-12-01 15:12:31 -08:00
Alya Abbott 6f796e0cbd plans_page: Adjust /plans content.
[squash]: Update sponsorsip and question boxes for Cloud.

[squash]: Update tabs subtitles.

[squash]: Content for info boxes for self-hosted plans.

[squash]: Adjust content to fit design.

portico: Tweak /plans text.
2023-12-01 15:12:31 -08:00
Karl Stolley 4f8cc13417 plans_page: Place text, background colors. 2023-12-01 15:12:31 -08:00
Karl Stolley b0db397ec6 plans_page: Add independent additional info sections for cloud, self-hosted. 2023-12-01 15:12:31 -08:00
Karl Stolley 29a09ca793 plans_page: Add cloud Plus plan. 2023-12-01 15:12:31 -08:00
Karl Stolley c9f33344e2 plans_page: Add JS toggle for showing cloud or self-hosted plans. 2023-12-01 15:12:31 -08:00
Karl Stolley eb36256d7a plans_page: Handle typesetting and vertical alignment. 2023-12-01 15:12:31 -08:00
Karl Stolley 52f8f56286 plans_page: Rough out structures and grid layout. 2023-12-01 15:12:31 -08:00
Karl Stolley a6498ad666 plans_page: Simplify structures and present page header. 2023-12-01 15:12:31 -08:00
Karl Stolley 9e4cda6ecc plans_page: Align content with Vlad's mock. 2023-12-01 15:12:31 -08:00
Karl Stolley 93aa5747d3 plans_page: Duplicate existing pricing for business page. 2023-12-01 15:12:31 -08:00
Aman Agrawal 5d49e54d33 upgrade: Show tier corresponding to session on upgrade page. 2023-12-01 08:55:58 -08:00
Aman Agrawal 9889dc38fe event_status: Pass billing_base_url to calculate realm specific URLs. 2023-12-01 08:55:58 -08:00
Tim Abbott 610338d192 billing: Add BILLING_SCHEDULE_ prefix to values. 2023-11-29 23:32:56 -08:00
Aman Agrawal cd7893b1bf sponsorship: Use `organization_type` as field name for simplification. 2023-11-29 19:04:32 -08:00
Mateusz Mandera 2765c63f56 remote_billing: Add flow for legacy servers. 2023-11-29 14:40:27 -08:00
Lauryn Menard 81a5977a6e analytics: Adjust width and margin CSS for activity pages. 2023-11-29 11:52:36 -08:00
Lauryn Menard 26168728ca analytics: Add chart key to remote activity page.
Adds a chart key to the top of the remote activity page.

Also, combines the support and stats links for a remote server into
one column.
2023-11-29 11:41:35 -08:00
Aman Agrawal 311f72dd56 footer: Add social links with icons.
Fixes #27886

Removed old twitter link in the same column.
2023-11-29 10:37:16 -08:00
Sayam Samal db6246fcc7 logout: Move logout form from the ".app" div to the body.
The hidden logout form facilitates logging out from the app by providing
a form with the CSRF token required for the csrf_token protection in
Jinja2.

This commit moves this form from the ".app" div to the body,
where it is more appropriately placed in the DOM.

This is a prep commit for #27550.
2023-11-29 10:35:18 -08:00
Sayam Samal 929d34ccd7 modals: Move "About Zulip" modal from ".app" div to body.
The "About Zulip" modal should be appended to the body, like the other
modals and not inside the ".app" div.

This is a prep commit for #27550.
2023-11-29 10:35:18 -08:00
Lauryn Menard 276ceb46e2 emails: Add organization details to confirm registration for new org.
Adds details about the requested organization URL and type to the
registration confirmation email that's sent when creating a new
Zulip organization.

Fixes #25899.
2023-11-28 09:52:31 -08:00
Lauryn Menard 4e577119b4 analytics: Use gear icon as realm support link on installation activity. 2023-11-28 09:20:45 -08:00
Alya Abbott fcd0783202 upgrade: Simplify free trial upgrade page. 2023-11-28 08:57:27 -08:00
Aman Agrawal cc6ab527b4 upgrade: Match width of license count input with billing page input. 2023-11-27 14:17:18 -08:00
Alya Abbott 9788e7514f billing: Edit text of free trial upgrade page. 2023-11-27 14:17:18 -08:00
Alya Abbott 585ed6c569 billing: Tweak text of free trial downgrade confirmation modal. 2023-11-27 14:17:18 -08:00
Aman Agrawal fa699032ca upgrade: Drop option to select billing frequency in free trail.
We set monthly as default for billing frequency and let users
change it on the billing page.
2023-11-27 14:17:18 -08:00
Aman Agrawal b35a792623 billing: Allow free trial orgs to switch billing frequency.
Fixes #27855
2023-11-27 14:17:18 -08:00
Aman Agrawal 482b5d8871 upgrade: Minor text changes to free trial page.
Fixes #27684
2023-11-27 14:17:18 -08:00
Aman Agrawal fe1a40279c billing: Downgrade realm at the end of free trial.
Fixes #27875

Instead of immediately ending the free trial, we end the free trial
at the end of the cycle.
2023-11-27 14:17:18 -08:00
Alex Vandiver 9f6d340536 footer: Add https://status.zulip.com link.
Fixes: #14417.
2023-11-27 12:09:04 -08:00
Aman Agrawal 9fe1e38f98 billing: Remove unused input field. 2023-11-26 20:24:25 -08:00
Aman Agrawal 79d1a1850c billing: Remove card change success message.
This message is barely visible to the user so removed. Now, the
card change behaviour is same as on upgrade page.
2023-11-26 20:24:25 -08:00
Aman Agrawal 4844ef9810 upgrade: Pass customer_name instead of realm object to upgrade context.
This will help simplify things for remote realms.
2023-11-24 09:22:02 -08:00
Aman Agrawal 95f5d8bdb8 billing: Note applied discount on upgrade and billing pages.
Fixes #27526
2023-11-23 10:32:39 -08:00
Aman Agrawal 07d29126fd sponsorship: Improve page for sponsorship pending orgs.
Fixes #27686
2023-11-23 10:32:39 -08:00
Aman Agrawal 003b29ba14 billing_page: Redirect orgs on paid plans with sponsorship pending.
Redirect sponsorship pending realms on a paid plan to billing page
with banner which reflects the current status of their request.
2023-11-23 10:32:39 -08:00
Aman Agrawal 5422dd3661 sponsorship: Improve sponsorship page for sponsored realms. 2023-11-23 10:32:39 -08:00
Mateusz Mandera 3958743b33 corporate: Add prototype authentication system for self-hosters.
This makes it possible for a self-hosted realm administrator to
directly access a logged-page on the push notifications bouncer
service, enabling billing, support contacts, and other administrator
for enterprise customers to be managed without manual setup.
2023-11-22 17:03:47 -08:00
David Rosa 411d0d7863 help: Document modal to generate bot URL.
Adds a help center article to document the new modal for generating
an integration URL, and links /integrations docs to this article.

Fixes #27744.
2023-11-22 10:36:39 -08:00
Aman Agrawal d82efbd503 free_trial: Remove extra onboarding flow.
We still redirect free trial users to upgrade page on first
signup but no longer pass the onboarding param.
2023-11-22 08:06:22 -08:00
Aman Agrawal 2218c49244 billing: Minor changes to text for free trial.
Fixes #27685
2023-11-22 08:06:22 -08:00
Aman Agrawal de267b964c event_status: Return user back to same license management after session.
If the update / add card session is successful, return user to
manual license management page if user was on it before clicking
the add / update card button.
2023-11-21 11:44:04 -08:00
Aman Agrawal 626768f626 upgrade: Remove dead error message block. 2023-11-21 10:42:12 -08:00
Aman Agrawal 2b68b300a1 upgrade: Add some recommendation for user on payment failure. 2023-11-21 10:42:12 -08:00
Aman Agrawal 69d8442ab4 billing: Allow user to switch between billing frequencies. 2023-11-21 10:42:12 -08:00
Aman Agrawal 6d80460425 billing: Convert some underline separated names to dashes. 2023-11-21 10:42:12 -08:00
Aman Agrawal 09009ab03a upgrade: Separate add card and purchase upgrade flow.
We now let user add / update card in a separate session and then
charge users after clicking on the purchase button.
2023-11-20 12:04:56 -08:00
Aman Agrawal a9e9f54962 upgrade: Show loading spinner after clicking on upgrade org button. 2023-11-20 12:04:56 -08:00
Aman Agrawal 637e9c11ee billing: Show success text after plan change on top after reload. 2023-11-13 10:35:39 -08:00
Aman Agrawal 67bddb3d72 billing: Show success message for license change after page reload. 2023-11-13 10:35:39 -08:00
Aman Agrawal c2e01f06a3 billing: Show message for users without access to page in a white box. 2023-11-13 10:35:39 -08:00
Aman Agrawal 2997c269e1 billing: Show breakdown of renewal amount if not fixed_price. 2023-11-13 10:35:39 -08:00
Aman Agrawal 17573cd1fb billing: Don't show license update buttons until valid change in value. 2023-11-13 10:35:39 -08:00
Aman Agrawal 2a70143050 upgrade: Show user/month plurals based on their count. 2023-11-13 10:35:39 -08:00
Aman Agrawal 874d4a7026 upgrade: Improve styles for free trial upgrade. 2023-11-13 10:35:39 -08:00
Aman Agrawal 2ffae56efa upgrade: Improve styles for onboarding free trial orgs. 2023-11-13 10:35:39 -08:00
Aman Agrawal a04204e47d billing: Style go to your org better. 2023-11-13 10:35:39 -08:00
Aman Agrawal 6158411ecb upgrade: Move error fields under the purchase button. 2023-11-13 10:35:39 -08:00
Aman Agrawal 7d10b3dcf7 upgrade: Add required fields to upgrade a realm. 2023-11-13 10:35:39 -08:00
Aman Agrawal 09db89a0c8 upgrade: Remove extra wrapping elements. 2023-11-13 10:35:39 -08:00
Aman Agrawal 2f9a48cce7 upgrade: Show payment amount based on user input.
Write script to make payment amount vary with payment schedule
and number of licenses.
2023-11-13 10:35:39 -08:00
Aman Agrawal dfe179bf0d upgrade: Add input for num of licenses for manual management. 2023-11-13 10:35:39 -08:00
Aman Agrawal f5ba6fe03c upgrade: Fix HTML structure and styles. 2023-11-13 10:35:39 -08:00
Aman Agrawal 6cadf333fb upgrade: Remove invoice payment instructions. 2023-11-13 10:35:39 -08:00
Aman Agrawal f273229b01 upgrade: Add payment button and info style with fake text. 2023-11-13 10:35:39 -08:00
Aman Agrawal 4638f67e4e upgrade: Use style similar to /billing page. 2023-11-13 10:35:39 -08:00
Aman Agrawal d3363bab96 upgrade: Add a dropdown to select billing cycle. 2023-11-13 10:35:39 -08:00
Aman Agrawal 2570f7ce23 upgrade: Control automatic / manual license management via URL. 2023-11-13 10:35:39 -08:00
Aman Agrawal 682ef235b5 upgrade: Remove tab structure. 2023-11-13 10:35:39 -08:00
Aman Agrawal 395cafcf46 sponsorship: Add extra input fields to get more org info.
Fixes #27600
2023-11-13 08:52:13 -08:00