Design and overhaul of Account Plans screen

* Basically working now except for VAT calculation
* Includes pricing grid, basic total calculation
* Revamped layout
* Implemented getting the service ID in BillingController.php
This commit is contained in:
Albert Santoni 2014-06-25 18:58:54 -04:00
parent 6f1727d8f3
commit d92e5197e1
10 changed files with 393 additions and 51 deletions

View file

@ -34,7 +34,7 @@ class Application_Form_BillingClient extends Zend_Form
$companyname->setLabel(_('Company Name:'))
->setValue($client["companyname"])
->setAttrib('class', 'input_text')
->setRequired(true)
->setRequired(false)
->addValidator($notEmptyValidator)
->addFilter('StringTrim');
$this->addElement($companyname);
@ -85,7 +85,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($state);
$postcode = new Zend_Form_Element_Text('postcode');
$postcode->setLabel(_('Zip Code:'))
$postcode->setLabel(_('Zip Code / Postal Code:'))
->setValue($client["postcode"])
->setAttrib('class', 'input_text')
->setRequired(true)

View file

@ -4,17 +4,9 @@ class Application_Form_BillingUpgradeDowngrade extends Zend_Form
public function init()
{
$productPrices = array();
$productTypes = array();
$products = BillingController::getProducts();
foreach ($products as $k => $p) {
$productPrices[$p["name"]] = array(
"monthly" => $p["pricing"]["USD"]["monthly"],
"annualy" => $p["pricing"]["USD"]["annually"]
);
$productTypes[$p["pid"]] = $p["name"];
}
$productTypes = array();
list($productPrices, $productTypes) = BillingController::getProductPricesAndTypes();
//$currentPlanType = ucfirst(Application_Model_Preference::GetPlanLevel());
$currentPlanType = "Hobbyist";
if (($key = array_search($currentPlanType, $productTypes)) !== false) {
@ -30,7 +22,7 @@ class Application_Form_BillingUpgradeDowngrade extends Zend_Form
$billingcycle = new Zend_Form_Element_Radio('newproductbillingcycle');
$billingcycle->setLabel(_('Billing cycle:'))
->setMultiOptions(array('monthly' => 'monthly', 'annually' => 'annually'))
->setMultiOptions(array('monthly' => 'Monthly', 'annually' => 'Annually'))
->setRequired(true)
->setValue('monthly');
$this->addElement($billingcycle);
@ -50,6 +42,8 @@ class Application_Form_BillingUpgradeDowngrade extends Zend_Form
$this->addElement($submit);*/
$client = new Application_Form_BillingClient();
$client->removeElement("password2");
$client->removeElement("password2verify");
$this->addSubForm($client, 'billing_client_info');
}
}