Added Payment, other minor fixes

This commit is contained in:
Deon George
2011-12-20 16:46:10 +11:00
parent c8fd44f844
commit a40ce27a16
31 changed files with 452 additions and 1280 deletions

View File

@@ -47,7 +47,7 @@ abstract class StaticListModule extends StaticList {
*/
public static function form($name,$default='',$addblank=FALSE) {
// Override our argument list as defined in parent
list($name,$table,$default,$key,$value,$where) = func_get_args();
list($name,$table,$default,$key,$value,$where,$addblank,$attributes) = func_get_args();
// @todo - our query type should come from our configuration?
$db = DB::select()->from($table);
@@ -69,6 +69,9 @@ abstract class StaticListModule extends StaticList {
// Else we return a select list
$x = array();
if ($addblank)
$x[] = '';
foreach ($db as $record) {
$x[$record[$key]] = $record[$value];
@@ -77,7 +80,7 @@ abstract class StaticListModule extends StaticList {
static::$record[$table] = $record;
}
return Form::select($name,$x,$default);
return Form::select($name,$x,$default,$attributes);
}
}
?>