[Mpuls-commits] r3234 - base/trunk/mpulsweb/templates/phase

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 23 14:13:28 CEST 2010


Author: torsten
Date: 2010-07-23 14:13:27 +0200 (Fri, 23 Jul 2010)
New Revision: 3234

Modified:
   base/trunk/mpulsweb/templates/phase/phase.mako
Log:
* mpulsweb/templates/phase/phase.mako: Issue652: Disable "Start" and
	"End" Buttons if the case is not in a editable state.


Modified: base/trunk/mpulsweb/templates/phase/phase.mako
===================================================================
--- base/trunk/mpulsweb/templates/phase/phase.mako	2010-07-23 10:58:06 UTC (rev 3233)
+++ base/trunk/mpulsweb/templates/phase/phase.mako	2010-07-23 12:13:27 UTC (rev 3234)
@@ -58,7 +58,7 @@
           ${h.NA(h.format_date(p1.getTime()))}
         </td>
         <td class="actions middle" style="border-bottom: 1pt dotted; border-color: #000;">
-          % if p1.is_ok() and phases_are_valid and p1.is_neighbor(current_phase) and h.hasRole(['cm']):
+          % if p1.is_ok() and phases_are_valid and p1.is_neighbor(current_phase) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
             <input type="submit" name="${p1.id}" value="${_('Start')}">
           % else:
             <input type="submit" name="${p1.id}" value="${_('Start')}" disabled="disabled">
@@ -74,7 +74,7 @@
         <td class="note">${h.literal(p2.getLinks())}</td>
         <td class="note center middle">${h.NA(h.format_date(p2.getTime()))}</td>
         <td class="actions">
-          % if p2.is_ok() and phases_are_valid and p2.is_neighbor(current_phase) and h.hasRole(['cm']):
+          % if p2.is_ok() and phases_are_valid and p2.is_neighbor(current_phase) and h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
             <input type="submit" name="${p2.id}" value="${_('Finish')}">
           % else:
             <input type="submit" name="${p2.id}" value="${_('Finish')}" disabled="disabled">



More information about the Mpuls-commits mailing list