Add a class to the Tokenizer container while it is focused

Summary: For some evil design purpose.

Test Plan: Focused, blurred tokenizers.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5780
Add "Carts" to Phortune

Summary: Although I imagine we aren't really going to have an "add to cart" type storefront, putting this in place makes a lot of other workflows simpler. No storage yet, just allows reasonable construction of a "buy stuff" page.

Test Plan: {F41342}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5745
Add basic payment providers to Phortune

Summary: Abstract out the Stripiness of payment providers so we can add a Test provider (and maybe MtGox / Balanced / Paypal / etc). Ref T2787.

Test Plan: Ran unit tests.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5752
Genericize "Add Payment Method" form

Summary:
Ref T2787. For payment methods that allow you to add a billable method (i.e., a credit card), move all the logic into the provider. In particular:

  - Providers may (Stripe, Balanced) or may not (Paypal, MtGox) allow you to add rebillable payment methods. Providers which don't allow rebillable methods will appear at checkout instead and we'll just invoice you every month if you don't use a rebillable method.
  - Providers which permit creation of rebillable methods handle their own data entry, since this will be per-provider.
  - "Add Payment Method" now prompts you to choose a provider. This is super ugly and barely-usable for the moment. When there's only one choice, we'll auto-select it in the future.

Test Plan: Added new Stripe payment methods; hit all the Stripe errors.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5756
Clean up rendering of credit card form

Summary:
General cleanup and separation into generic vs Stripe blocks of code.

  - There was an old CC form view for Stripe stuff that I never cleaned up; clean that up.
  - Move non-Stripe CC form rendering into a base class (Balanced can reuse it).
  - Move non-Stripe CC form JS into a shareable class.
  - Simplify JS a bit (JX.Workflow can add extra parameters to a request, so we don't need hidden inputs).
  - Genericize CSS.
  - Depend on Stripe JS directly, if they're down we're not going to be able to add cards anyway.

Ref T2787.

Test Plan: Hit all Stripe errors and added new cards.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5758
Add Balanced Payments API

Summary: Adds the Balanced PHP API to externals/. Ref T2787.

Test Plan: Used in next diff.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran, aurelijus

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5764
Implement Balanced Payments as a PhortunePaymentProvider

Summary:
Allows Balanced payment methods to be added. This works essentially the same way as Stripe, except everything is a little bit different.

Slightly more stuff could be shared, but I feel //mostly// good about this. I'll probably do a bit more cleanup next. Some of the error handling is messy, in particular.

Ref T2787.

Test Plan: Added Balanced and Stripe payment methods.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5765
General cleanup for adding payment methods in Phortune

Summary:
This has no real behavioral changes (except better error handling), it just factors things out to be a bit cleaner. In particular:

  - Move more shared form behaviors into the common JS form component.
  - Move more error handling into shared pathways.
  - Make the specialized Stripe / Balanced methods do less work.

This needs some more polish for nontrival errors (especially on the Balanced side) but none of the error behavior is worse than it was and a lot of it is much better.

Ref T2787.

Test Plan: Hit all invalid form errors, added valid payment methods with Stripe and Balacned.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5771
Allow PhortuneTestProvider to add payment methods

Summary: Provide a bare implementation so that you can add PhortuneTestProvider as a payment method. Ref 2787.

Test Plan: Added "cards" through the test provider.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5772
Make public feed show all stories, using the omnipotent user

Auditors: chad
Invert italics in emphasized Remarkup blockquote

Test Plan:
  lang=remarkup
  > a //b//

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D5782
Display bullet next to request with errors in DarkConsole.

Summary:
I always put a `phlog()` somewhere or something fails and I have hard times figuring out which request it was.

Also fix safe HTML in panel.

Test Plan: Looked at DarkConsole with error on main page, AJAX request and both.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5784
Flip strings for 'metamta.differential.unified-comment-context' config

Summary: These should be in (true, false) order, not (false, true) order. This was a transcritpion error in porting the config over.

Test Plan: Edited config from the web, verified the labels matched the underlying values.

Reviewers: tberman, btrahan

Reviewed By: tberman

CC: aran

Differential Revision: https://secure.phabricator.com/D5786
Add a User-Agent header to OAuth requests

Summary: GitHub now requires this: http://developer.github.com/changes/2013-04-24-user-agent-required/

Test Plan: Used GitHub auth to login.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5787
Conpherence - paginate thread list

Summary: this is D5750 but just the conpherence part. fixes a few random conpherence bugs / quirks as well. Also messes with ApplicationTransactionEditor to expose the xactions so Conpherence doesn't over-update participation rows. Fixes T2429.

Test Plan: set LIMIT to 3. verified I could scroll down all conpherences. next, picked a conpherence "in the middle" to load. verified I could page up and down. next, picked a conpherence in the middle then had another user update that conpherence. verified as I paged up the conpherence re-loaded properly selected

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin, vrana

Maniphest Tasks: T2429

Differential Revision: https://secure.phabricator.com/D5783
Conpherence - fix a bug

Summary: gotta idx() on this as the user may have no conpherences at all.

Test Plan: loaded up my 'noconpherences' user and observed no errors in the error log. my normal test user still worked okay too.

Reviewers: epriestley, garoevans

Reviewed By: garoevans

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5791
Using PhabricatorExternalAccount

Summary: Using PhabricatorExternalAccount in place maniphest.default-public-author.

Test Plan:
Using receivemail to see if the a new entry is made in the 'phabircator_user.user_externalaccount' table. Few things, I noticed that phabricator creates table 'user_externalaccout'. And now it throws up error 'Unknown column 'dateCreated' in 'field list''. Awaiting your comments.
{F41370}

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T1205

Differential Revision: https://secure.phabricator.com/D5747
Updates to phrequent's landing page

Summary:
https://secure.phabricator.com/D5554#comment-4

Implemented the changes outlined above.

Test Plan: Go to the page, click the new nav links, try the user filter

Reviewers: epriestley, hach-que

CC: hach-que, aran, Korvin

Differential Revision: https://secure.phabricator.com/D5789
Completed Paste Generation

Summary: Ref T2903

Test Plan: Pastes being generated with all types of parents, view policies, code, etc.

Reviewers: epriestley, AnhNhan

Reviewed By: epriestley

CC: AnhNhan, aran, Korvin

Maniphest Tasks: T2903

Differential Revision: https://secure.phabricator.com/D5707
Updated the CLI for smoother use

Summary: Ref T2903

Test Plan: Tested all CLI possibilities

Reviewers: epriestley, AnhNhan

Reviewed By: epriestley

CC: AnhNhan, aran, Korvin, jqh9804

Maniphest Tasks: T2903

Differential Revision: https://secure.phabricator.com/D5711