liquid_feedback_frontend
view app/main/member/settings_notification.lua @ 971:a8c6e80cdf5d
Fixed showing of wrong issue cancelled information
| author | bsw | 
|---|---|
| date | Sat Mar 09 19:13:55 2013 +0100 (2013-03-09) | 
| parents | 418b590fa9ed | 
| children | 701a5cf6b067 | 
 line source
     1 ui.title(_"Notification settings")
     3 util.help("member.settings.notification", _"Notification settings")
     5 ui.form{
     6   attr = { class = "vertical" },
     7   module = "member",
     8   action = "update_notify_level",
     9   routing = {
    10     ok = {
    11       mode = "redirect",
    12       module = "index",
    13       view = "index"
    14     }
    15   },
    16   content = function()
    17     ui.tag{ tag = "p", content = _"I like to receive notifications by email about events in my areas and issues:" }
    19     ui.container{ content = function()
    20       ui.tag{
    21         tag = "input", 
    22         attr = {
    23           id = "notify_level_none",
    24           type = "radio", name = "notify_level", value = "none",
    25           checked = app.session.member.notify_level == 'none' and "checked" or nil
    26         }
    27       }
    28       ui.tag{
    29         tag = "label", attr = { ['for'] = "notify_level_none" },
    30         content = _"No notifications at all"
    31       }
    32     end }
    34     slot.put("<br />")
    36     ui.container{ content = function()
    37       ui.tag{
    38         tag = "input", 
    39         attr = {
    40           id = "notify_level_all",
    41           type = "radio", name = "notify_level", value = "all",
    42           checked = app.session.member.notify_level == 'all' and "checked" or nil
    43         }
    44       }
    45       ui.tag{
    46         tag = "label", attr = { ['for'] = "notify_level_all" },
    47         content = _"All of them"
    48       }
    49     end }
    51     slot.put("<br />")
    53     ui.container{ content = function()
    54       ui.tag{
    55         tag = "input", 
    56         attr = {
    57           id = "notify_level_discussion",
    58           type = "radio", name = "notify_level", value = "discussion",
    59           checked = app.session.member.notify_level == 'discussion' and "checked" or nil
    60         }
    61       }
    62       ui.tag{
    63         tag = "label", attr = { ['for'] = "notify_level_discussion" },
    64         content = _"Only for issues reaching the discussion phase"
    65       }
    66     end }
    68     slot.put("<br />")
    70     ui.container{ content = function()
    71       ui.tag{
    72         tag = "input", 
    73         attr = {
    74           id = "notify_level_verification",
    75           type = "radio", name = "notify_level", value = "verification",
    76           checked = app.session.member.notify_level == 'verification' and "checked" or nil
    77         }
    78       }
    79       ui.tag{
    80         tag = "label", attr = { ['for'] = "notify_level_verification" },
    81         content = _"Only for issues reaching the frozen phase"
    82       }
    83     end }
    85     slot.put("<br />")
    87     ui.container{ content = function()
    88       ui.tag{
    89         tag = "input", 
    90         attr = {
    91           id = "notify_level_voting",
    92           type = "radio", name = "notify_level", value = "voting",
    93           checked = app.session.member.notify_level == 'voting' and "checked" or nil
    94         }
    95       }
    96       ui.tag{
    97         tag = "label", attr = { ['for'] = "notify_level_voting" },
    98         content = _"Only for issues reaching the voting phase"
    99       }
   100     end }
   102     slot.put("<br />")
   104     ui.submit{ value = _"Change notification settings" }
   105   end
   106 }
