liquid_feedback_frontend
view app/main/admin/member_edit.lua @ 145:90520c9fca44
implement area filter in timeline
allows the user to ignore any area in the timeline filter.
better display in javascript off
allows the user to ignore any area in the timeline filter.
better display in javascript off
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Thu Oct 07 00:35:48 2010 +0200 (2010-10-07) |
parents | 768faea1096d |
children | 46351752814f |
line source
1 local id = param.get_id()
3 local member
4 if id then
5 member = Member:new_selector():add_where{"id = ?", id}:optional_object_mode():exec()
6 slot.put_into("title", encode.html(_("Member: '#{login}' (#{name})", { login = member.login, name = member.name })))
7 else
8 slot.put_into("title", encode.html(_"Register new member"))
9 end
11 ui.form{
12 attr = { class = "vertical" },
13 module = "admin",
14 action = "member_update",
15 id = member and member.id,
16 record = member,
17 readonly = not app.session.member.admin,
18 routing = {
19 default = {
20 mode = "redirect",
21 modules = "admin",
22 view = "member_list"
23 }
24 },
25 content = function()
26 ui.field.text{ label = _"Login", name = "login" }
27 ui.field.text{ label = _"Name", name = "name" }
28 ui.field.password{ label = _"Password", name = "password", value = (member and member.password) and "********" or "" }
29 ui.field.boolean{ label = _"Admin?", name = "admin" }
30 ui.field.boolean{ label = _"Active?", name = "active" }
31 ui.submit{ text = _"Save" }
32 end
33 }