liquid_feedback_frontend

diff app/main/admin/_action/member_update.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 e17e35dc8aa6
children 9d15d509b5f6
line diff
     1.1 --- a/app/main/admin/_action/member_update.lua	Thu Jun 23 03:30:57 2016 +0200
     1.2 +++ b/app/main/admin/_action/member_update.lua	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -2,7 +2,21 @@
     1.4  
     1.5  local member = Member:by_id(id) or Member:new()
     1.6  
     1.7 -param.update(member, "identification", "notify_email", "admin")
     1.8 +param.update(member, "identification", "admin")
     1.9 +
    1.10 +local notify_email = param.get("notify_email")
    1.11 +if notify_email == "" then
    1.12 +  notify_email = nil
    1.13 +end
    1.14 +
    1.15 +member.notify_email = notify_email
    1.16 +
    1.17 +local notify_email_unconfirmed = param.get("notify_email_unconfirmed")
    1.18 +if notify_email_unconfirmed == "" then
    1.19 +  notify_email_unconfirmed = nil
    1.20 +end
    1.21 +
    1.22 +member.notify_email_unconfirmed = notify_email_unconfirmed
    1.23  
    1.24  local locked = param.get("locked", atom.boolean)
    1.25  if locked ~= nil then
    1.26 @@ -40,10 +54,18 @@
    1.27    local privilege = Privilege:new()
    1.28    privilege.member_id = member.id
    1.29    privilege.unit_id = config.single_unit_id
    1.30 +  privilege.initiative_right = true
    1.31    privilege.voting_right = true
    1.32    privilege:save()
    1.33  end
    1.34  
    1.35 +if not id then
    1.36 +  local profile = MemberProfile:new()
    1.37 +  profile.member_id = member.id
    1.38 +  profile.profile = json.object()
    1.39 +  profile:save()
    1.40 +end
    1.41 +
    1.42  local units = Unit:new_selector()
    1.43    :add_field("privilege.member_id NOTNULL", "privilege_exists")
    1.44    :add_field("privilege.voting_right", "voting_right")

Impressum / About Us