Commit Graph

46 Commits

Author SHA1 Message Date
Aman Agrawal 7614f2203a pricing: Replace "Zulip Standard" with "Zulip Cloud Standard".
Case sensitive replace.
2022-02-09 11:00:24 -08:00
Eeshan Garg 3b9455c9ce billing: Make all buttons the same size.
Previously, the "Add Card" button was significantly larger than
the "Buy Standard" and "Submit" buttons.
2022-01-19 16:11:31 -08:00
Steve Howell 2f0f27b841 templates: Fix minor whitespace errors.
(we also add validation)
2021-12-02 09:49:10 -08:00
Steve Howell fdd63546b2 linters: Rewrite check-templates.
I rewrote most of tools/lib/pretty-printer.py, which
was fairly easy due to being able to crib some
important details from the previous implementation.

The main motivation for the rewrite was that we weren't
handling else/elif blocks correctly, and it was difficult
to modify the previous code. The else/elif shortcomings
were somewhat historical in nature--the original parser
didn't recognize them (since they weren't in any Zulip
templates at the time), and then the pretty printer was
mostly able to hack around that due to the "nudge"
strategy. Eventually the nudge strategy became too
brittle.

The "nudge" strategy was that we would mostly trust
the existing templates, and we would just nudge over
some lines in cases of obviously faulty indentation.

Now we are bit more opinionated and rigorous, and
we basically set the indentation explicitly for any
line that is not in a code/script block. This leads
to this diff touching several templates for mostly
minor fix-ups.

We aren't completely opinionated, as we respect the
author's line wrapping decisions in many cases, and
we also allow authors not to indent blocks within
the template language's block constructs.
2021-11-23 15:55:54 -08:00
Vishnu KS 6c06858e02 billing: Migrate to Stripe hosted checkout page. 2021-11-05 17:23:10 -07:00
Eeshan Garg a808f02a22 billing/sponsorship: Allow blank organization URLs.
We ran into a bug in production caused by two issues:
- Some users came from orgs that didn't have a website and since
  the URL field was required, they submitted invalid URLs.
- We didn't properly respond to invalid form submissions, which
  led to UnboundLocalError exceptions in another part of the
  code.

This commit solves this by doing the following:
- We now allow blank URLs and have a convenient placeholder text
  label that tells users that they may leave the URL field blank.
- This commit refactors the code such that invalid form submissions
  result in an informative error message about what exactly went
  wrong.
2021-08-19 03:08:17 -07:00
Tim Abbott 9fb5149f78 billing: Select the models organization type by default.
Probably in an ideal world, something should make sure these values
are the same.
2021-07-18 20:48:50 -07:00
Tim Abbott d7ef0c7232 billing: Fix options and help text for sponsorship requests.
This makes several changes:

* Fixes a bug where the help text explaining our policies was not displayed.
* No help text was defined for many organization types.
* Copy-edits the help text somewhat.
* Offers all of the organization type options.
* Removes the 100% coverage requirement because it's annoying to test
  the e.currentTarget click handler.
2021-07-18 20:48:27 -07:00
Eeshan Garg 0ac7d7d21d corporate: Store sponsorship request data in the database.
We are starting to run into situations where this data could be
quite useful for making future decisions, so it makes to store it
in the database, not just in an email.
2021-07-15 10:31:03 -07:00
Anders Kaseorg dd3fa4ac52 templates: Mark all void tags as self-closing.
This reverses the policy that was set, but incompletely enforced, by
commit 951514dd7d.  The self-closing tag
syntax is clearer, more consistent, simpler to parse, compatible with
XML, preferred by Prettier, and (most importantly now) required by
FormatJS.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-21 09:49:34 -07:00
Vishnu KS e736bc3ec6 sponsorship: Ensure that all the fields are filled in form. 2020-07-31 10:36:53 -07:00
Anders Kaseorg c2f9db4602 logo: Update Zulip logo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-16 01:37:08 -07:00
Vishnu KS 4c6350fa4b billing: Add option to request a sponsorship in /upgrade. 2020-07-01 16:45:38 -07:00
Tim Abbott 4d2b1673f8 docs: Replace support@zulipchat.com with support@zulip.com.
The new address is cleaner and shorter.
2020-05-28 08:14:30 +00:00
Tim Abbott 368e9572cc billing: Clean up copy on free trial pages.
This fixes some issues with unclear terminology and visual styling in
the pages for the new free trial.

There's probably more we can and should usefully do in the future.
2020-05-26 21:31:07 -07:00
Vishnu KS be831e0085 free trial: Hide free trial message during payment processing. 2020-05-26 17:01:32 -07:00
Vishnu KS 8784539d53 free trial: Send users to /upgrade after realm creation. 2020-05-26 17:01:32 -07:00
Vishnu KS ad99bba121 billing: Add emojis to /upgrade page. 2020-05-24 17:35:17 -07:00
Vishnu Ks 66b1ad7002 billing: User FREE_TRIAL_DAYS instead of FREE_TRIAL_MONTHS. 2020-05-16 14:52:01 -07:00
Vishnu KS f1b1bf5a0d billing: Add support for Zulip Standard free trial. 2020-05-11 17:20:54 -07:00
Vishnu KS a9c1fa25d6 upgrade: Set the default billing period to monthly. 2020-04-17 08:57:15 -07:00
Anders Kaseorg fda70a5458 templates: Use just one webpack entry point per page.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-10-28 15:53:15 -07:00
Anders Kaseorg 7494f1600c templates: Move page_params from an inline script to the <body> dataset.
This sidesteps tricky escaping issues, and will make it easier to
build a strict Content-Security-Policy.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-17 16:06:33 -07:00
Anders Kaseorg 9b38bcc2a6 templates: Abstract render_bundle behind a Jinja2 macro.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-09-17 16:06:33 -07:00
Vishnu Ks 8c249644b1 billing: Seperate out tests for invoice and autopay form fields. 2019-05-30 10:34:56 -07:00
Rishi Gupta 6a1017ea94 billing: Update text on /upgrade. 2019-01-29 06:30:19 -08:00
Vishnu Ks 2547d4ea07 billing: Remove mix option from frontend. 2019-01-04 23:52:00 +05:30
Vishnu Ks d94b0da3c8 billing: Separate billing.js into multiple modules. 2019-01-04 23:52:00 +05:30
Vishnu Ks 41fbc699ad billing: Make invoice upgrade use create_ajax_request. 2018-12-30 08:00:23 +05:30
Vishnu Ks 938438364f billing: Use form.serializeArray in create_ajax_request. 2018-12-30 08:00:23 +05:30
Vishnu Ks 93b1795ed1 billing: Don't pass csrf token in Ajax requests.
The Ajax request will automatically fetch the value
from input[name='csrfmiddlewaretoken'] and set the
headers. This is done in csrf.js.
2018-12-30 08:00:23 +05:30
Vishnu Ks ed196bb980 billing: Rename #invoice_seat_count to #invoiced_licenses.
Followup of b4a28f3147
2018-12-30 08:00:23 +05:30
Vishnu Ks eebf526657 billing: Check for min license count in frontend. 2018-12-30 08:00:23 +05:30
Rishi Gupta e7220fd71f billing: Do subscription management in-house instead of with Stripe Billing.
This is a major rewrite of the billing system. It moves subscription
information off of stripe Subscriptions and into a local CustomerPlan
table.

To keep this manageable, it leaves several things unimplemented
(downgrading, etc), and a variety of other TODOs in the code. There are also
some known regressions, e.g. error-handling on /upgrade is broken.
2018-12-22 13:39:30 -08:00
Rishi Gupta b4a28f3147 billing: Rename seat_count to licenses where appropriate. 2018-12-22 13:30:15 -08:00
Rishi Gupta 7ab1406962 billing: Prepare for moving Plan to CustomerPlan.billing_schedule. 2018-12-22 13:30:15 -08:00
Vishnu Ks 8176d112fe billing: Add frontend for license-based billing system. 2018-12-22 13:30:15 -08:00
Vishnu Ks 0fd6ff722b billing: Migrate /upgrade endpoint to JSON.
The fixture changes are because self.upgrade formerly used to cause a page load
of /billing, which in turn calls Customer.retrieve.

If we ran the full test suite with GENERATE_STRIPE_FIXTURES=True, we would
likely see several more Customer.retrieve.N.json's being deleted. But
keeping them there for now to keep the diff small.
2018-12-13 17:01:12 -08:00
Rishi Gupta 1ba037201c billing: Move all price computations into billing.js. 2018-11-30 11:19:07 -08:00
Rishi Gupta 7523282e48 billing: Move cost calculation from upgrade.html to billing.js. 2018-11-30 11:19:07 -08:00
Rishi Gupta 882cf224f8 billing: Update wording on /upgrade. 2018-11-24 16:06:52 -08:00
Vishnu Ks 189e5e1fbd billing: Add frontend for upgrading by invoice. 2018-11-24 11:56:13 -08:00
Rishi Gupta 6afbc2726f billing: Add billing_modality to upgrade form. 2018-11-24 11:56:13 -08:00
Rishi Gupta 458169928c billing: Rename Zulip Premium to Zulip Standard. 2018-10-24 10:42:16 -07:00
Rishi Gupta a4d3606bad billing: Assume we are charging right away when adding new users.
The actual implementation of the change will be a cron job that runs once a
day and generates invoices for anyone with an account_balance > 0.

There are currently no tests for that part of the flow, so no tests had to
change.
2018-10-23 16:19:47 -07:00
Vishnu Ks daf3b46262 billing: Move billing related templates from zilencer to corporate. 2018-10-01 15:43:39 -07:00