]> git.llucax.com Git - software/sercom.git/blob - sercom/subcontrollers/curso/templates/edit.kid
curso carga masiva
[software/sercom.git] / sercom / subcontrollers / curso / templates / edit.kid
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
3     py:extends="'../../../templates/master.kid'">
4 <head>
5 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
6 <title>edit</title>
7 </head>
8 <script type="text/javascript">
9     function init_data() {
10  //       MochiKit.DOM.getElement('form_responsable').focus();
11         MochiKit.DOM.getElement('form_anio').focus();
12         <span py:for="d in record.docentes_curso" py:strip="True">
13             MochiKit.DOM.appendChildNodes("form_docentes_curso", OPTION({"value":${d['id']}}, '${d['label']}'))
14         </span>
15         
16         <span py:for="a in record.alumnos_inscriptos" py:strip="True">
17             MochiKit.DOM.appendChildNodes("form_alumnos", OPTION({"value":${a['id']}}, '${a['label']}'))
18         </span>
19     }
20     MochiKit.DOM.addLoadEvent(init_data)
21     
22     function makeOption(option) {
23         return OPTION({"value": option.value}, option.text);
24     }
25                    
26     function moveOption( fromSelect, toSelect) {
27         // add 'selected' nodes toSelect
28         appendChildNodes(toSelect,
29         map( makeOption,ifilter(itemgetter('selected'), $(fromSelect).options)));
30         // remove the 'selected' fromSelect
31         // replaceChildNodes(fromSelect,
32         // list(ifilterfalse(itemgetter('selected'), $(fromSelect).options)));
33     }
34     
35     function mover( src, dest ) {
36         moveOption(src, dest)    
37     }
38     
39     function remover (src, dest) {
40         replaceChildNodes(src,list(ifilterfalse(itemgetter('selected'), $(src).options)))
41     }
42     
43 </script>
44 <body>
45
46 <h1>Modificación de <span py:replace="name">Objeto</span></h1>
47
48 <div py:replace="form(value=record, action=tg.url('/curso/update/%d' % record.id),
49     submit_text=_(u'Guardar'))">Formulario</div>
50 <br/>
51 <a href="${tg.url('/curso/from_file/%d' % record.id)}">Agregar Alumnos desde archivo</a>
52     <br/>
53     <br/>
54 <a href="${tg.url('/curso/show/%d' % record.id)}">Ver (cancela)</a> |
55 <a href="${tg.url('/curso/list')}">Volver (cancela)</a>
56
57 </body>
58 </html>