liquid_feedback_frontend

diff app/main/agent/_action/accept.lua @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents
children 87878d24d7a8
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/agent/_action/accept.lua	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -0,0 +1,26 @@
     1.4 +local controlled_id = param.get("controlled_id")
     1.5 +
     1.6 +local agent = Agent:by_pk(controlled_id, app.session.member_id)
     1.7 +
     1.8 +if not agent then
     1.9 +  print("A")
    1.10 +  return false
    1.11 +end
    1.12 +
    1.13 +if agent.accepted ~= nil then
    1.14 +  print("B")
    1.15 +  return false
    1.16 +end
    1.17 +
    1.18 +if param.get("rejected") then
    1.19 +  print("C")
    1.20 +  agent.accepted = false
    1.21 +elseif param.get("accepted") then
    1.22 +  print("D")
    1.23 +  agent.accepted = true
    1.24 +else
    1.25 +  print("E")
    1.26 +  return false
    1.27 +end
    1.28 +print("F")
    1.29 +agent:save()

Impressum / About Us