Vishnu Ks
b7d210a932
billing: Use javascript onhashchange handler instead of jQuery one.
...
Makes it easier to obtain the onhashchange handler
in node tests.
2019-05-30 10:34:56 -07:00
Vishnu Ks
5fc538cac0
billing: Use on(click) instead of click handler.
...
Makes it easy to get the click handler in node tests.
2019-05-30 10:34:56 -07:00
Vishnu Ks
50989a3380
billing: Use location.hash instead of window.location.
2019-05-30 10:34:56 -07:00
Vishnu Ks
5f0492b3b1
billing: Use this.value instead of .val().
...
This change is mostly for making testing easier.
2019-02-04 22:37:05 -08:00
Vishnu Ks
ab97a84f3a
billing: Use is_valid_input helper for checkValidity.
...
Mainly for making the node tests easier to write.
2019-02-04 22:37:05 -08:00
Vishnu Ks
7b22fec532
billing: User on(change) instead of change() in upgrade.js.
2019-02-04 22:37:05 -08:00
Vishnu Ks
ce1db751d0
billing: Make tabs work with back forward buttons.
2019-01-25 16:40:46 -08:00
Vishnu Ks
537b7612cb
billing: Remove hash when reloading upgrade page.
2019-01-25 16:40:46 -08:00
Vishnu Ks
b89a10676a
billing: Use underscore built in contains function.
2019-01-08 10:47:35 -08:00
Vishnu Ks
2547d4ea07
billing: Remove mix option from frontend.
2019-01-04 23:52:00 +05:30
Vishnu Ks
c1551405aa
billing: Extract setting initial tab into helpers.js.
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
343e124270
billing: Remove get_form_input function.
2019-01-04 23:52:00 +05:30
Vishnu Ks
806fa1a834
billing: Make card change use create_ajax_request.
2018-12-30 08:00:23 +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
b655cfe379
billing: Extract autopay ajax request code as function.
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
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
d086efd33f
billing: Deduplicate get_form_input in billing.js.
2018-12-22 13:30:15 -08:00
Vishnu Ks
30a61d7505
billing: Fix plan input bug in upgrade.
2018-12-21 09:34:27 -08:00
Tim Abbott
bdb3da4504
eslint: Add key-spacing linter rule.
...
Apparently, we didn't have one of these, and thus had a moderate
number of generally very old violations in the codebase. Fix this and
clear the ones that exist..
2018-12-18 10:41:06 -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
c59da02936
billing: Reflect discounts on /upgrade.
2018-11-30 11:19:07 -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
60d3c17b6b
billing: Enable tab navigation on /upgrade.
2018-11-30 11:19:07 -08:00
Vishnu Ks
4533f8f962
billing: Make URL hash work in billing page.
...
This will change the hash of the URL when a new tab
gets selected. Vice versa when the billing page is opened
the appropriate tab is selected according to hash of
the URL. This means when the card gets updated the
page would be reloaded correctly to show #payment-method
tab.
2018-11-01 12:50:24 -07:00
Vishnu Ks
5a6b2ebb1f
billing: Add ability for users to change their card.
2018-09-24 19:25:26 -07:00