Improved service display
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
29
application/classes/staticlist/recurtype.php
Normal file
29
application/classes/staticlist/recurtype.php
Normal 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);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user