| rev | 
   line source | 
| 
bsw@1090
 | 
     1 local id = param.get_id()
 | 
| 
bsw@1090
 | 
     2 
 | 
| 
bsw@1090
 | 
     3 local member = Member:by_id(id)
 | 
| 
bsw@1090
 | 
     4 
 | 
| 
bsw@1621
 | 
     5 --ui.title(_"Deactivate member")
 | 
| 
bsw@1621
 | 
     6 
 | 
| 
bsw@1621
 | 
     7 ui.titleAdmin(_"Member")
 | 
| 
bsw@1621
 | 
     8 
 | 
| 
bsw@1621
 | 
     9 ui.grid{ content = function()
 | 
| 
bsw@1621
 | 
    10 
 | 
| 
bsw@1621
 | 
    11   ui.cell_main{ content = function()
 | 
| 
bsw@1621
 | 
    12     ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
 | 
| 
bsw@1621
 | 
    13       ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
 | 
| 
bsw@1621
 | 
    14         ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Deactivate member" }
 | 
| 
bsw@1621
 | 
    15       end }
 | 
| 
bsw@1621
 | 
    16       ui.container{ attr = { class = "mdl-card__content" }, content = function()
 | 
| 
bsw@1090
 | 
    17 
 | 
| 
bsw@1090
 | 
    18 
 | 
| 
bsw@1621
 | 
    19         ui.form{
 | 
| 
bsw@1621
 | 
    20           attr = { class = "vertical section" },
 | 
| 
bsw@1621
 | 
    21           module = "admin",
 | 
| 
bsw@1621
 | 
    22           action = "member_deactivate",
 | 
| 
bsw@1621
 | 
    23           id = member and member.id,
 | 
| 
bsw@1621
 | 
    24           record = member,
 | 
| 
bsw@1621
 | 
    25           routing = {
 | 
| 
bsw@1621
 | 
    26             error = {
 | 
| 
bsw@1621
 | 
    27               mode = "forward",
 | 
| 
bsw@1621
 | 
    28               module = "admin", view = "member_deactivate", id = id
 | 
| 
bsw@1621
 | 
    29             },
 | 
| 
bsw@1621
 | 
    30             default = {
 | 
| 
bsw@1621
 | 
    31               mode = "redirect",
 | 
| 
bsw@1621
 | 
    32               modules = "admin", view = "index"
 | 
| 
bsw@1621
 | 
    33             }
 | 
| 
bsw@1621
 | 
    34           },
 | 
| 
bsw@1621
 | 
    35           content = function()
 | 
| 
bsw@1090
 | 
    36 
 | 
| 
bsw@1621
 | 
    37             ui.container{ content = _"Do you really want to irrevocably deactive this member?" }
 | 
| 
bsw@1621
 | 
    38             slot.put("<br>")
 | 
| 
bsw@1621
 | 
    39             ui.container{ content = _"ID" .. ": " .. member.id }
 | 
| 
bsw@1621
 | 
    40             ui.container{ content = _"Identification" .. ": " .. member.identification }
 | 
| 
bsw@1621
 | 
    41             ui.container{ content = _"Screen name" .. ": " .. member.name }
 | 
| 
bsw@1621
 | 
    42             slot.put("<br>")
 | 
| 
bsw@1621
 | 
    43             ui.tag{ tag = "input", attr = { type = "checkbox", name = "sure", value = "yes" } }
 | 
| 
bsw@1621
 | 
    44             ui.tag { content = _"I want to deactive this member irrevocably" }
 | 
| 
bsw@1621
 | 
    45             slot.put("<br />")
 | 
| 
bsw@1621
 | 
    46             slot.put("<br />")
 | 
| 
bsw@1621
 | 
    47 
 | 
| 
bsw@1621
 | 
    48             ui.submit{
 | 
| 
bsw@1621
 | 
    49               attr = { class = "mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" },
 | 
| 
bsw@1621
 | 
    50               text = _"Deactivate member"
 | 
| 
bsw@1621
 | 
    51             }
 | 
| 
bsw@1621
 | 
    52             slot.put(" ")
 | 
| 
bsw@1621
 | 
    53             ui.link {
 | 
| 
bsw@1621
 | 
    54               attr = { class = "mdl-button mdl-js-button" },
 | 
| 
bsw@1621
 | 
    55               module = "admin", view = "member_edit", id = member.id, content = _"cancel"
 | 
| 
bsw@1621
 | 
    56             }
 | 
| 
bsw@1621
 | 
    57 
 | 
| 
bsw@1621
 | 
    58           end
 | 
| 
bsw@1621
 | 
    59         }
 | 
| 
bsw@1621
 | 
    60       end }
 | 
| 
bsw@1621
 | 
    61     end }
 | 
| 
bsw@1621
 | 
    62   end }
 | 
| 
bsw@1621
 | 
    63 end }
 | 
| 
bsw@1621
 | 
    64 
 |