Last change
on this file since 442 was
441,
checked in by ecprice, 17 years ago
|
Sort hvm/paravm list alphabetically.
|
File size:
948 bytes
|
Rev | Line | |
---|
[205] | 1 | #def cdromList($cdroms, $default="") |
---|
[406] | 2 | <select name="cdrom" id="cdromlist"> |
---|
[205] | 3 | <option #slurp |
---|
| 4 | #if $default then '' else 'selected' |
---|
| 5 | value="">None</option> |
---|
| 6 | #for $cdrom in $cdroms |
---|
| 7 | <option #slurp |
---|
| 8 | #if $default == $cdrom.cdrom_id then 'selected' else '' |
---|
| 9 | value="$cdrom.cdrom_id"> |
---|
| 10 | $cdrom.description |
---|
| 11 | </option> |
---|
| 12 | #end for |
---|
| 13 | </select> |
---|
| 14 | #end def |
---|
| 15 | |
---|
[440] | 16 | #def vmTypeList($default=None) |
---|
[441] | 17 | #for $vmtype in sorted($sipb_xen_database.Type.select(), key=lambda x: x.description) |
---|
[440] | 18 | <label> |
---|
| 19 | <input #slurp |
---|
| 20 | #if $default == $vmtype then 'checked' else '' |
---|
| 21 | type="radio" name="vmtype" value="${vmtype.type_id}">${vmtype.description}</input> |
---|
| 22 | </label> |
---|
| 23 | #end for |
---|
| 24 | #end def |
---|
| 25 | |
---|
[205] | 26 | #def addError(txt) |
---|
| 27 | #if $varExists('txt') |
---|
| 28 | #set global $error_text = $error_text + '----\n' + $txt |
---|
| 29 | #else |
---|
| 30 | #set global $error_text = $txt |
---|
| 31 | #end if |
---|
| 32 | #end def |
---|
| 33 | |
---|
| 34 | #def errorRow($value, $err) |
---|
| 35 | #if $err and $err.err_field == $value |
---|
| 36 | <tr> |
---|
| 37 | <td class="error" colspan="2">${str($err)}</td> |
---|
| 38 | </tr> |
---|
| 39 | #end if |
---|
| 40 | #end def |
---|
| 41 | |
---|
| 42 | $full_body |
---|
Note: See
TracBrowser
for help on using the repository browser.