Theme work with focusbusiness and baseadmin
Improvements to NAVBAR, updates to StaticList methods, other minor items Enable product category rendering and other minor improvements Added ADSL-large category price plan
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class StaticList_RecurSchedule extends StaticList {
|
||||
protected function table() {
|
||||
protected function _table() {
|
||||
return array(
|
||||
0=>_('Weekly'),
|
||||
1=>_('Monthly'),
|
||||
@@ -22,34 +22,8 @@ class StaticList_RecurSchedule extends StaticList {
|
||||
);
|
||||
}
|
||||
|
||||
public static function factory() {
|
||||
return new StaticList_RecurSchedule;
|
||||
}
|
||||
|
||||
public static function display($value) {
|
||||
return static::_display($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the price display for a product
|
||||
*
|
||||
* @uses product
|
||||
*/
|
||||
public static function form($name,$product='',$default='',$addblank=FALSE) {
|
||||
if (empty($product))
|
||||
throw new Kohana_Exception('Product is a required field for :method',array(':method'=>__METHOD__));
|
||||
|
||||
$x = '';
|
||||
$table = static::factory()->table();
|
||||
|
||||
foreach ($product->get_price_array() as $term => $price) {
|
||||
$x[$term] = sprintf('%s %s',Currency::display(Tax::add($price['price_base'])),$table[$term]);
|
||||
|
||||
if ($price['price_setup'] > 0)
|
||||
$x[$term] .= sprintf(' + %s %s',Currency::display(Tax::add($price['price_setup'])),_('Setup'));
|
||||
}
|
||||
|
||||
return Form::select($name,$x,$default);
|
||||
public static function get($value) {
|
||||
return static::factory()->_get($value);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user