[Mpuls-commits] r6161 - in wasko/trunk/waskoweb: controllers templates/casemanagement

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 19 12:23:02 CET 2012


Author: torsten
Date: 2012-12-19 12:23:02 +0100 (Wed, 19 Dec 2012)
New Revision: 6161

Modified:
   wasko/trunk/waskoweb/controllers/case.py
   wasko/trunk/waskoweb/templates/casemanagement/new.mako
Log:
Readded fields to choose between "Neuaufnahme, Wiederaufnahem, Erstaufnahme"
again.


Modified: wasko/trunk/waskoweb/controllers/case.py
===================================================================
--- wasko/trunk/waskoweb/controllers/case.py	2012-12-18 13:35:28 UTC (rev 6160)
+++ wasko/trunk/waskoweb/controllers/case.py	2012-12-19 11:23:02 UTC (rev 6161)
@@ -51,6 +51,19 @@
 class CaseController(MpulsCaseController):
 
     @checkRole('cm')
+    def new2(self):
+        c.case = session.get('case')
+        if c.case is None:
+            redirect(url('new'))
+        else:
+            form_errors = {}
+            form_defaults = c.case.getData()
+            form_defaults['aufnahme_typ'] = '0'
+            form = render('/casemanagement/new.mako')
+            return formencode.htmlfill.render(form, defaults=form_defaults,
+                                              auto_insert_errors=False,
+                                              errors=form_errors)
+
     def newAction(self):
         # TODO: Use htmlfill here!
         session_case = SessionCase()

Modified: wasko/trunk/waskoweb/templates/casemanagement/new.mako
===================================================================
--- wasko/trunk/waskoweb/templates/casemanagement/new.mako	2012-12-18 13:35:28 UTC (rev 6160)
+++ wasko/trunk/waskoweb/templates/casemanagement/new.mako	2012-12-19 11:23:02 UTC (rev 6161)
@@ -77,6 +77,21 @@
         </tr>
     </table>
     </fieldset>
+    <fieldset>
+      <legend>${_('Type of admission')}</legend>
+      <input type="radio" name="aufnahme_typ" value="0" id="type_aufnahme_1" checked="checked">
+      <label for="type_aufnahme_1">${_('Initial admission')}</label><br>
+      <input type="radio" name="aufnahme_typ" value="1" id="type_aufnahme_2">
+      <label for="type_aufnahme_2">${_('Reopening after successful reintegration')}</label>
+      <a target="_blank" href="${h.url_for('/annotations/help/wiederaufnahme')}">
+        <img alt="${_('help icon')}" src="${h.url_for('/images/icons/form_help.png')}" border="0">
+      </a><br>
+      <input type="radio" name="aufnahme_typ" value="2" id="type_aufnahme_3">
+      <label for="type_aufnahme_3">${_('New admission after other termination')}</label> 
+      <a target="_blank" href="${h.url_for('/annotations/help/neuaufnahme')}">
+        <img alt="${_('help icon')}" src="${h.url_for('/images/icons/form_help.png')}" border="0">
+      </a>
+     </fieldset>
     <%include file="new_statement_block.mako" />
     <div class="input_space">
       <input type="submit" value="${_('Print statement')}" name="print">



More information about the Mpuls-commits mailing list