X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/dce58e66ce47f06e84bf7b60ad88ac729f264971..82e153ac0aa4f3697db9d799a42fee4fcc198826:/code/templates/functions.tmpl?ds=sidebyside diff --git a/code/templates/functions.tmpl b/code/templates/functions.tmpl index 7b917b0..86dc772 100644 --- a/code/templates/functions.tmpl +++ b/code/templates/functions.tmpl @@ -1,18 +1,47 @@ -#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($database.CDROM.query(), 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($database.Autoinstall.query(), key=lambda x: x.description), + default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description') +#end filter +#end def + +#def vmTypeList($default=None) +#for $vmtype in (('linux-hvm', 'HVM'), ('linux', 'ParaVM'), ) + +#end for +#end def + #def addError(txt) #if $varExists('txt') #set global $error_text = $error_text + '----\n' + $txt @@ -28,5 +57,7 @@ #end if #end def - -$full_body \ No newline at end of file +#filter None +$full_body +#end filter +#end filter