Added Payment, other minor fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user