X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/74cf12ca4c1ba056483885a9b3b0d5c86014f1d1..5d194c948d57f1a6f0ff48b39117aa6070a65bf3:/code/templates/functions.tmpl?ds=sidebyside diff --git a/code/templates/functions.tmpl b/code/templates/functions.tmpl index c3aa050..2ae2266 100644 --- a/code/templates/functions.tmpl +++ b/code/templates/functions.tmpl @@ -1,20 +1,39 @@ -#def cdromList($cdroms, $default="") - - #for $cdrom in $cdroms + #for $item in $lst #end for #end def +#def cdromList($default="", $onchange=None) +#filter None +$databaseList(sorted($sipb_xen_database.CDROM.select(), key=lambda x: x.description), + default, onchange, 'cdrom', 'cdromlist', 'cdrom_id', 'description') +#end filter +#end def + +#def autoList($default="", $onchange=None) +#filter None +$databaseList(sorted($sipb_xen_database.Autoinstall.select(), key=lambda x: x.description), + default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description') +#end filter +#end def + #def vmTypeList($default=None) -#for $vmtype in $sipb_xen_database.Type.select() +#for $vmtype in sorted($sipb_xen_database.Type.select(), key=lambda x: x.description)