liquid_feedback_frontend

view app/main/admin/_action/area_update.lua @ 123:390bd09de226

add custom script slot
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sun Sep 19 04:44:58 2010 +0200 (2010-09-19)
parents 915cc0341538
children 36aedac3e4bf
line source
1 if not app.session.member.admin then
2 error()
3 end
5 local id = param.get_id()
7 local area
8 if id then
9 area = Area:new_selector():add_where{ "id = ?", id }:single_object_mode():exec()
10 else
11 area = Area:new()
12 end
15 param.update(area, "name", "description", "active")
17 area:save()
19 param.update_relationship{
20 param_name = "allowed_policies",
21 id = area.id,
22 connecting_model = AllowedPolicy,
23 own_reference = "area_id",
24 foreign_reference = "policy_id"
25 }
27 slot.put_into("notice", _"Area successfully updated")

Impressum / About Us