Differential D10673 Diff 25632 src/applications/phortune/controller/PhortuneCartCheckoutController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phortune/controller/PhortuneCartCheckoutController.php
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
$cart_table = $this->buildCartContentTable($cart); | $cart_table = $this->buildCartContentTable($cart); | ||||
$cart_box = id(new PHUIObjectBoxView()) | $cart_box = id(new PHUIObjectBoxView()) | ||||
->setFormErrors($errors) | ->setFormErrors($errors) | ||||
->setHeaderText(pht('Cart Contents')) | ->setHeaderText(pht('Cart Contents')) | ||||
->appendChild($cart_table); | ->appendChild($cart_table); | ||||
$title = pht('Buy Stuff'); | $title = $cart->getName(); | ||||
if (!$methods) { | if (!$methods) { | ||||
$method_control = id(new AphrontFormStaticControl()) | $method_control = id(new AphrontFormStaticControl()) | ||||
->setLabel(pht('Payment Method')) | ->setLabel(pht('Payment Method')) | ||||
->setValue( | ->setValue( | ||||
phutil_tag('em', array(), pht('No payment methods configured.'))); | phutil_tag('em', array(), pht('No payment methods configured.'))); | ||||
} else { | } else { | ||||
$method_control = id(new AphrontFormRadioButtonControl()) | $method_control = id(new AphrontFormRadioButtonControl()) | ||||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
} | } | ||||
$payment_box = id(new PHUIObjectBoxView()) | $payment_box = id(new PHUIObjectBoxView()) | ||||
->setHeaderText(pht('Choose Payment Method')) | ->setHeaderText(pht('Choose Payment Method')) | ||||
->appendChild($form) | ->appendChild($form) | ||||
->appendChild($provider_form); | ->appendChild($provider_form); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
$crumbs->addTextCrumb(pht('Checkout')); | |||||
$crumbs->addTextCrumb($title); | $crumbs->addTextCrumb($title); | ||||
return $this->buildApplicationPage( | return $this->buildApplicationPage( | ||||
array( | array( | ||||
$crumbs, | $crumbs, | ||||
$cart_box, | $cart_box, | ||||
$payment_box, | $payment_box, | ||||
), | ), | ||||
array( | array( | ||||
'title' => $title, | 'title' => $title, | ||||
)); | )); | ||||
} | } | ||||
} | } |