liquid_feedback_frontend

diff app/main/vote/_action/update.lua @ 964:1997cf1da04b

Added support for finished phases
author bsw
date Thu Feb 21 19:32:48 2013 +0100 (2013-02-21)
parents e616d8f16f14
children 701a5cf6b067
line diff
     1.1 --- a/app/main/vote/_action/update.lua	Thu Feb 21 18:56:59 2013 +0100
     1.2 +++ b/app/main/vote/_action/update.lua	Thu Feb 21 19:32:48 2013 +0100
     1.3 @@ -11,13 +11,13 @@
     1.4  
     1.5  local update_comment = param.get("update_comment") == "1" and true or false
     1.6  
     1.7 -if issue.closed and not update_comment then
     1.8 -  slot.put_into("error", _"This issue is already closed.")
     1.9 +if issue.state ~= "voting" and not issue.closed then
    1.10 +  slot.put_into("error", _"Voting has not started yet.")
    1.11    return false
    1.12  end
    1.13  
    1.14 -if issue.state ~= "voting" and not issue.closed then
    1.15 -  slot.put_into("error", _"Voting has not started yet.")
    1.16 +if issue.phase_finished or issue.closed and not update_comment then
    1.17 +  slot.put_into("error", _"This issue is already closed.")
    1.18    return false
    1.19  end
    1.20  

Impressum / About Us