bsw@1090: local id = param.get_id() bsw@1090: bsw@1090: local member = Member:by_id(id) bsw@1090: bsw@1090: ui.title(_"Deactivate member") bsw@1090: bsw@1090: bsw@1090: ui.form{ bsw@1090: attr = { class = "vertical section" }, bsw@1090: module = "admin", bsw@1090: action = "member_deactivate", bsw@1090: id = member and member.id, bsw@1090: record = member, bsw@1090: routing = { bsw@1090: error = { bsw@1090: mode = "forward", bsw@1090: module = "admin", view = "member_deactivate", id = id bsw@1090: }, bsw@1090: default = { bsw@1090: mode = "redirect", bsw@1090: modules = "admin", view = "index" bsw@1090: } bsw@1090: }, bsw@1090: content = function() bsw@1090: ui.sectionHead( function() bsw@1090: ui.heading { level = 1, content = member and (member.name or member.id) or _"New member" } bsw@1090: if member and member.identification then bsw@1090: ui.heading { level = 3, content = member.identification } bsw@1090: end bsw@1090: end ) bsw@1090: ui.sectionRow(function() bsw@1090: ui.heading { level = 2, content = _"Do you really want to irrevocably deactive this member?" } bsw@1090: ui.tag{ tag = "input", attr = { type = "checkbox", name = "sure", value = "yes" } } bsw@1090: ui.tag { content = _"I want to deactive this member irrevocably" } bsw@1090: slot.put("
") bsw@1090: slot.put("
") bsw@1090: ui.submit{ text = _"Deactivate member" } bsw@1090: slot.put(" ") bsw@1090: ui.link { module = "admin", view = "member_edit", id = member.id, content = _"cancel" } bsw@1090: end) bsw@1090: end bsw@1090: } bsw@1090: