Mercurial > hg > MPIWGWeb
diff zpt/staff/edit_teaching.zpt @ 170:485bf377913a
fix staff editing pages.
author | casties |
---|---|
date | Fri, 07 Jun 2013 16:29:34 +0200 |
parents | ee79f6ba8d01 |
children | 980794794bb5 |
line wrap: on
line diff
--- a/zpt/staff/edit_teaching.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_teaching.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -5,51 +5,56 @@ <tal:block metal:fill-slot="navsel" tal:define="global menusel string:teaching" /> <tal:block metal:fill-slot="body"> - <form action="" method="post"> + <form tal:attributes="action string:$root/editTeaching" method="post"> <input type="hidden" name="key_main" tal:attributes="value python:here.content.key"> <input type="hidden" name="main_fields" value="teaching__title"> - <table tal:define="founds2 python:here.getTeaching(published=False)"> + <table tal:define="teachings python:here.getTeaching(published=False)"> <tr> <th>Date</th> <th>Title/Place/Link</th> <th>Priority</th> <th>Show</th> </tr> - <tr class="fliesstext" tal:repeat="found2 founds2"> - <td valign="top"><input tal:attributes="name python:'teaching__date__'+str(found2.oid); - value python:found2.date" size="10" /> + <tr class="fliesstext" tal:repeat="teaching teachings"> + <td valign="top"> + <input tal:attributes="name python:'teaching__date__'+str(teaching.oid); value python:teaching.date" size="10" /> + </td> + + <td> + <input tal:attributes="name python:'teaching__title__'+str(teaching.oid); value python:teaching.title" size="80" /> <br/> + <input tal:attributes="name python:'teaching__place__'+str(teaching.oid); value python:teaching.place" size="80" /> <br/> + <input tal:attributes="name python:'teaching__link__'+str(teaching.oid); value python:teaching.link" size="80" /> </td> - <td><input tal:attributes="name python:'teaching__title__'+str(found2.oid); - value python:found2.title" size="80" /> <br> - <input tal:attributes="name python:'teaching__place__'+str(found2.oid); - value python:found2.place" size="80" /> <br> - <input tal:attributes="name python:'teaching__link__'+str(found2.oid); - value python:found2.link" size="80" /></td> - - <td valign="top"><input tal:attributes="name python:'teaching__priority__'+str(found2.oid); - value found2/priority" - size="3" /></td> - <td valign="top" tal:define="name string:teaching__published__${found2/oid}; value found2/published;"> + <td valign="top"> + <input tal:attributes="name python:'teaching__priority__'+str(teaching.oid); value teaching/priority" size="3" /> + </td> + <td valign="top" tal:define="name string:teaching__published__${teaching/oid}; value teaching/published;"> <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> </td> - <td><a tal:attributes="href python:'deleteField?table=teaching&oid=%s'%found2.oid">delete</a></td> + <td><a tal:attributes="href string:$root/deleteField?table=teaching&oid=${teaching/oid}">delete</a></td> </tr> <tr colspan="4"> - <td>Add new</td> + <th>Add new</th> </tr> <tr> - <td valign="top"><input tal:attributes="name python:'teaching__date__new'" size="10" /></td> - <td><input tal:attributes="name python:'teaching__title__new'" size="80"> <br> - <input tal:attributes="name python:'teaching__place__new'" size="80" /> <br> - <input tal:attributes="name python:'teaching__link__new'" size="80" /></td> + <td valign="top"> + <input tal:attributes="name python:'teaching__date__new'" size="10" /> + </td> + <td> + <input tal:attributes="name python:'teaching__title__new'" size="80"/> <br/> + <input tal:attributes="name python:'teaching__place__new'" size="80" /> <br/> + <input tal:attributes="name python:'teaching__link__new'" size="80" /> + </td> <td><input tal:attributes="name python:'teaching__priority__new'" size="3"></td> <td valign="top" tal:define="name string:teaching__published__new; value string:yes;"> <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> </td> </tr> </table> - <input type="submit" value="submit"> + <p> + <input type="submit" value="submit"/> + </p> </form> </tal:block>