X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/e37dd15bbf8683bab8454ea0eec8e9968ce982b2..b812ecb815635726dca92b6c3725ac0a4bb86ab6:/code/templates/functions.tmpl diff --git a/code/templates/functions.tmpl b/code/templates/functions.tmpl index 213b639..0854e6f 100644 --- a/code/templates/functions.tmpl +++ b/code/templates/functions.tmpl @@ -1,18 +1,43 @@ -#def cdromList($cdroms, $default="") - - #for $cdrom in $cdroms + #for $item in $lst #end for #end def +#def cdromList($default="", $onchange=None) +$databaseList(sorted($sipb_xen_database.CDROM.select(), key=lambda x: x.description), + default, onchange, 'cdrom', 'cdromlist', 'cdrom_id', 'description') +#end def + +#def autoList($default="", $onchange=None) +$databaseList(sorted($sipb_xen_database.Autoinstall.select(), key=lambda x: x.description), + default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description') +## $databaseList(autos, default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description') +#end def + +#def vmTypeList($default=None) +#for $vmtype in sorted($sipb_xen_database.Type.select(), key=lambda x: x.description) + +#end for +#end def + #def addError(txt) #if $varExists('txt') #set global $error_text = $error_text + '----\n' + $txt