Add _pro macros to a bunch of billing page stuff

This commit is contained in:
Albert Santoni 2015-09-04 11:17:01 -04:00
parent d4287e9abd
commit 274881c6e0
3 changed files with 26 additions and 26 deletions

View File

@ -14,7 +14,7 @@ class Application_Form_BillingClient extends Zend_Form
$emailValidator = Application_Form_Helper_ValidationTypes::overrideEmailAddressValidator(); $emailValidator = Application_Form_Helper_ValidationTypes::overrideEmailAddressValidator();
$firstname = new Zend_Form_Element_Text('firstname'); $firstname = new Zend_Form_Element_Text('firstname');
$firstname->setLabel(_('First Name:')) $firstname->setLabel(_pro('First Name:'))
->setValue($client["firstname"]) ->setValue($client["firstname"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -23,7 +23,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($firstname); $this->addElement($firstname);
$lastname = new Zend_Form_Element_Text('lastname'); $lastname = new Zend_Form_Element_Text('lastname');
$lastname->setLabel(_('Last Name:')) $lastname->setLabel(_pro('Last Name:'))
->setValue($client["lastname"]) ->setValue($client["lastname"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -32,7 +32,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($lastname); $this->addElement($lastname);
$companyname = new Zend_Form_Element_Text('companyname'); $companyname = new Zend_Form_Element_Text('companyname');
$companyname->setLabel(_('Company Name:')) $companyname->setLabel(_pro('Company Name:'))
->setValue($client["companyname"]) ->setValue($client["companyname"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(false) ->setRequired(false)
@ -41,7 +41,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($companyname); $this->addElement($companyname);
$email = new Zend_Form_Element_Text('email'); $email = new Zend_Form_Element_Text('email');
$email->setLabel(_('Email Address:')) $email->setLabel(_pro('Email Address:'))
->setValue($client["email"]) ->setValue($client["email"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -51,7 +51,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($email); $this->addElement($email);
$address1 = new Zend_Form_Element_Text('address1'); $address1 = new Zend_Form_Element_Text('address1');
$address1->setLabel(_('Address 1:')) $address1->setLabel(_pro('Address 1:'))
->setValue($client["address1"]) ->setValue($client["address1"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -60,14 +60,14 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($address1); $this->addElement($address1);
$address2 = new Zend_Form_Element_Text('address2'); $address2 = new Zend_Form_Element_Text('address2');
$address2->setLabel(_('Address 2:')) $address2->setLabel(_pro('Address 2:'))
->setValue($client["address2"]) ->setValue($client["address2"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->addFilter('StringTrim'); ->addFilter('StringTrim');
$this->addElement($address2); $this->addElement($address2);
$city = new Zend_Form_Element_Text('city'); $city = new Zend_Form_Element_Text('city');
$city->setLabel(_('City:')) $city->setLabel(_pro('City:'))
->setValue($client["city"]) ->setValue($client["city"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -77,7 +77,7 @@ class Application_Form_BillingClient extends Zend_Form
//TODO: get list from whmcs? //TODO: get list from whmcs?
$state = new Zend_Form_Element_Text('state'); $state = new Zend_Form_Element_Text('state');
$state->setLabel(_('State/Region:')) $state->setLabel(_pro('State/Region:'))
->setValue($client["state"]) ->setValue($client["state"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -86,7 +86,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($state); $this->addElement($state);
$postcode = new Zend_Form_Element_Text('postcode'); $postcode = new Zend_Form_Element_Text('postcode');
$postcode->setLabel(_('Zip Code / Postal Code:')) $postcode->setLabel(_pro('Zip Code / Postal Code:'))
->setValue($client["postcode"]) ->setValue($client["postcode"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -99,7 +99,7 @@ class Application_Form_BillingClient extends Zend_Form
asort($countries, SORT_LOCALE_STRING); asort($countries, SORT_LOCALE_STRING);
$country = new Zend_Form_Element_Select('country'); $country = new Zend_Form_Element_Select('country');
$country->setLabel(_('Country:')) $country->setLabel(_pro('Country:'))
->setValue($client["country"]) ->setValue($client["country"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setMultiOptions($countries) ->setMultiOptions($countries)
@ -109,7 +109,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($country); $this->addElement($country);
$phonenumber = new Zend_Form_Element_Text('phonenumber'); $phonenumber = new Zend_Form_Element_Text('phonenumber');
$phonenumber->setLabel(_('Phone Number:')) $phonenumber->setLabel(_pro('Phone Number:'))
->setValue($client["phonenumber"]) ->setValue($client["phonenumber"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -118,7 +118,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($phonenumber); $this->addElement($phonenumber);
$securityqid = new Zend_Form_Element_Select('securityqid'); $securityqid = new Zend_Form_Element_Select('securityqid');
$securityqid->setLabel(_('Please choose a security question:')) $securityqid->setLabel(_pro('Please choose a security question:'))
->setValue($client["securityqid"]) ->setValue($client["securityqid"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -132,7 +132,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($securityqid); $this->addElement($securityqid);
$securityqans = new Zend_Form_Element_Text('securityqans'); $securityqans = new Zend_Form_Element_Text('securityqans');
$securityqans->setLabel(_('Please enter an answer:')) $securityqans->setLabel(_pro('Please enter an answer:'))
->setValue($client["securityqans"]) ->setValue($client["securityqans"])
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
->setRequired(true) ->setRequired(true)
@ -149,7 +149,7 @@ class Application_Form_BillingClient extends Zend_Form
} }
$vat = new Zend_Form_Element_Text("7"); $vat = new Zend_Form_Element_Text("7");
$vat->setLabel(_('VAT/Tax ID (EU only)')) $vat->setLabel(_pro('VAT/Tax ID (EU only)'))
->setBelongsTo('customfields') ->setBelongsTo('customfields')
->setValue($vatvalue) ->setValue($vatvalue)
->setAttrib('class', 'input_text') ->setAttrib('class', 'input_text')
@ -159,7 +159,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($vat); $this->addElement($vat);
$subscribe = new Zend_Form_Element_Checkbox('71'); $subscribe = new Zend_Form_Element_Checkbox('71');
$subscribe->setLabel(_('Subscribe to Sourcefabric newsletter')) $subscribe->setLabel(_pro('Subscribe to Sourcefabric newsletter'))
->setValue($subscribevalue) ->setValue($subscribevalue)
->setBelongsTo('customfields') ->setBelongsTo('customfields')
->setAttrib('class', 'billing-details-checkbox') ->setAttrib('class', 'billing-details-checkbox')
@ -169,7 +169,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($subscribe); $this->addElement($subscribe);
$password = new Zend_Form_Element_Password('password2'); $password = new Zend_Form_Element_Password('password2');
$password->setLabel(_('Password:')); $password->setLabel(_pro('Password:'));
$password->setAttrib('class', 'input_text'); $password->setAttrib('class', 'input_text');
$password->setValue("xxxxxx"); $password->setValue("xxxxxx");
$password->setRequired(true); $password->setRequired(true);
@ -178,7 +178,7 @@ class Application_Form_BillingClient extends Zend_Form
$this->addElement($password); $this->addElement($password);
$passwordVerify = new Zend_Form_Element_Password('password2verify'); $passwordVerify = new Zend_Form_Element_Password('password2verify');
$passwordVerify->setLabel(_('Verify Password:')); $passwordVerify->setLabel(_pro('Verify Password:'));
$passwordVerify->setAttrib('class', 'input_text'); $passwordVerify->setAttrib('class', 'input_text');
$passwordVerify->setValue("xxxxxx"); $passwordVerify->setValue("xxxxxx");
$passwordVerify->setRequired(true); $passwordVerify->setRequired(true);
@ -190,7 +190,7 @@ class Application_Form_BillingClient extends Zend_Form
$submit = new Zend_Form_Element_Submit("submit"); $submit = new Zend_Form_Element_Submit("submit");
$submit->setIgnore(true) $submit->setIgnore(true)
->setLabel(_("Save")); ->setLabel(_pro("Save"));
$this->addElement($submit); $this->addElement($submit);
} }
} }

View File

@ -168,8 +168,8 @@ $(document).ready(function() {
</script> </script>
<div class="ui-widget prefpanel clearfix padded-strong billing-panel"> <div class="ui-widget prefpanel clearfix padded-strong billing-panel">
<H2><?=_("Account Plans")?></H2> <H2><?=_pro("Account Plans")?></H2>
<H4><?=_("Upgrade today to get more listeners and storage space!")?></H4> <H4><?=_pro("Upgrade today to get more listeners and storage space!")?></H4>
<div class="pricing-grid"> <div class="pricing-grid">
<table> <table>
<tr> <tr>
@ -252,9 +252,9 @@ $(document).ready(function() {
</table> </table>
</div> </div>
<!-- <!--
<p> <a target="_blank" href="https://www.airtime.pro/pricing"><?=_("View Plans")?></a> (Opens in a new window)</p> <p> <a target="_blank" href="https://www.airtime.pro/pricing"><?=_pro("View Plans")?></a> (Opens in a new window)</p>
--> -->
<p id="current_plan"><span>Your Current Plan:</span> <p id="current_plan"><span><?php echo(_pro('Your Current Plan:')); ?></span>
<?php <?php
$currentProduct = Billing::getClientCurrentAirtimeProduct(); $currentProduct = Billing::getClientCurrentAirtimeProduct();
echo($currentProduct["name"]); echo($currentProduct["name"]);
@ -262,7 +262,7 @@ echo($currentProduct["name"]);
?> ?>
</p> </p>
<h3>Choose a plan:</h3> <h3>echo(_pro('Choose a plan: ')); ?></h3>
<form id="<?php echo $form->getId(); ?>" method="<?php echo $form->getMethod() ?>" action="<?php echo <form id="<?php echo $form->getId(); ?>" method="<?php echo $form->getMethod() ?>" action="<?php echo
$form->getAction()?>" enctype="<?php echo $form->getEncType();?>"> $form->getAction()?>" enctype="<?php echo $form->getEncType();?>">
@ -288,7 +288,7 @@ echo($currentProduct["name"]);
VAT will be added below if you are an EU resident without a valid VAT number. VAT will be added below if you are an EU resident without a valid VAT number.
</div> </div>
<h3>Enter your payment details:</h3> <h3><?=_pro("Please enter your payment details:");?></h3>
<?php if (isset($this->errorMessage)) {?> <?php if (isset($this->errorMessage)) {?>
<div class="errors"><?php echo $this->errorMessage ?></div> <div class="errors"><?php echo $this->errorMessage ?></div>
<?php }?> <?php }?>

View File

@ -6,7 +6,7 @@
<div class="trial-box-calendar-gray"><?php echo _("days") ?></div> <div class="trial-box-calendar-gray"><?php echo _("days") ?></div>
</div> </div>
<div class="trial-box-button"> <div class="trial-box-button">
<a title="<?php echo sprintf(_("Purchase an %s Pro plan!"), PRODUCT_NAME)?>" href="/billing/upgrade"><?php echo _("My Account") ?></a> <a title="<?php echo sprintf(_pro("Purchase an %s plan!"), SAAS_PRODUCT_BRANDING_NAME)?>" href="/billing/upgrade"><?php echo _pro("My Account") ?></a>
</div> </div>
</div> </div>
<?php }?> <?php }?>