Improved service display

This commit is contained in:
Deon George
2011-07-14 19:09:03 +10:00
parent 46c3b9a075
commit 27cdab1fe4
37 changed files with 1319 additions and 1042 deletions

View File

@@ -36,7 +36,7 @@ class StaticList_RecurSchedule extends StaticList {
*
* @uses product
*/
public static function form($name,$product='',$addblank=FALSE) {
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__));
@@ -50,7 +50,7 @@ class StaticList_RecurSchedule extends StaticList {
$x[$term] .= sprintf(' + %s %s',Currency::display($price['price_setup']),_('Setup'));
}
return Form::select($name,$x,$product->price_recurr_default);
return Form::select($name,$x,$default);
}
}
?>

View File

@@ -0,0 +1,29 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This is class renders Recurring Schedule Types on responses and forms.
*
* @package OSB
* @subpackage Utilities
* @category Helpers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class StaticList_RecurType extends StaticList {
protected function table() {
return array(
0=>_('Bill on Aniversary Date of Subscription'),
1=>_('Bill on Fixed Schedule'),
);
}
public static function factory() {
return new StaticList_RecurType;
}
public static function display($value) {
return static::_display($value);
}
}
?>