source: trunk/web/templates/functions.tmpl @ 235

Last change on this file since 235 was 205, checked in by ecprice, 17 years ago

A monster checkin, with a variety of changes to the web
infrastructure.

Adds some support for javascript and asynchronous updates.

Also added prototype.

The interface is *really* *slow*, though.

File size: 632 bytes
Line 
1#def cdromList($cdroms, $default="")
2<select name="cdrom">
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
16#def addError(txt)
17#if $varExists('txt')
18#set global $error_text = $error_text + '----\n' + $txt
19#else
20#set global $error_text = $txt
21#end if
22#end def
23
24#def errorRow($value, $err)
25#if $err and $err.err_field == $value
26<tr>
27<td class="error" colspan="2">${str($err)}</td>
28</tr>
29#end if
30#end def
31
32$full_body
Note: See TracBrowser for help on using the repository browser.