liquid_feedback_frontend

changeset 1261:0f4925c2843a

Fixes on notification system
author bsw
date Sun Apr 17 17:00:56 2016 +0200 (2016-04-17)
parents 775b0b040d8f
children ce6113ce6635
files app/main/member/settings_notification.lua
line diff
     1.1 --- a/app/main/member/settings_notification.lua	Sun Apr 17 16:59:12 2016 +0200
     1.2 +++ b/app/main/member/settings_notification.lua	Sun Apr 17 17:00:56 2016 +0200
     1.3 @@ -49,75 +49,77 @@
     1.4          
     1.5          slot.put("<br />")
     1.6          
     1.7 -        ui.container{ content = function()
     1.8 -          ui.tag{
     1.9 -            tag = "input", 
    1.10 -            attr = {
    1.11 -              id = "digest_on",
    1.12 -              type = "radio", name = "digest", value = "true",
    1.13 -              checked = not app.session.member.digest_dow and "checked" or nil
    1.14 -            }
    1.15 -          }
    1.16 -          ui.tag{
    1.17 -            tag = "label", attr = { ['for'] = "digest_on" },
    1.18 -            content = _"Send me updates on issue phase changes and a regular digest"
    1.19 -          }
    1.20 -          
    1.21 -          ui.tag{ content = _"Day:" }
    1.22 -          slot.put(" ")
    1.23 -          ui.field.select{
    1.24 -            container_attr = { style = "display: inline-block; width: 10em;" },
    1.25 -            name = "notification_dow",
    1.26 -            foreign_records = {
    1.27 -              { id = "daily", name = _"daily" },
    1.28 -              { id = "0", name = _"Sunday" },
    1.29 -              { id = "1", name = _"Monday" },
    1.30 -              { id = "2", name = _"Tuesday" },
    1.31 -              { id = "3", name = _"Wednesday" },
    1.32 -              { id = "4", name = _"Thursday" },
    1.33 -              { id = "5", name = _"Friday" },
    1.34 -              { id = "6", name = _"Saturday" }
    1.35 -            },
    1.36 -            foreign_id = "id",
    1.37 -            foreign_name = "name"
    1.38 -          }
    1.39 +        ui.container{ attr = { style = "margin-left: 3em;" }, content = function()
    1.40            
    1.41 -          slot.put(" ")
    1.42 -
    1.43 -          ui.tag{ content = _"Hour:" }
    1.44 -          slot.put(" ")
    1.45 -          local foreign_records = {}
    1.46 -          for i = 0, 23 do
    1.47 -            foreign_records[#foreign_records+1] = {
    1.48 -              id = i,
    1.49 -              name = string.format("%02d", i),
    1.50 +          ui.container{ content = function()
    1.51 +            ui.tag{
    1.52 +              tag = "input", 
    1.53 +              attr = {
    1.54 +                id = "digest_on",
    1.55 +                type = "radio", name = "digest", value = "true",
    1.56 +                checked = not app.session.member.digest_dow and "checked" or nil
    1.57 +              }
    1.58 +            }
    1.59 +            ui.tag{
    1.60 +              tag = "label", attr = { ['for'] = "digest_on" },
    1.61 +              content = _"Send me updates on issue phase changes and a regular digest"
    1.62 +            }
    1.63 +            
    1.64 +            ui.tag{ content = _"Day:" }
    1.65 +            slot.put(" ")
    1.66 +            ui.field.select{
    1.67 +              container_attr = { style = "display: inline-block; width: 10em; vertical-align: middle;" },
    1.68 +              name = "notification_dow",
    1.69 +              foreign_records = {
    1.70 +                { id = "daily", name = _"daily" },
    1.71 +                { id = "0", name = _"Sunday" },
    1.72 +                { id = "1", name = _"Monday" },
    1.73 +                { id = "2", name = _"Tuesday" },
    1.74 +                { id = "3", name = _"Wednesday" },
    1.75 +                { id = "4", name = _"Thursday" },
    1.76 +                { id = "5", name = _"Friday" },
    1.77 +                { id = "6", name = _"Saturday" }
    1.78 +              },
    1.79 +              foreign_id = "id",
    1.80 +              foreign_name = "name"
    1.81              }
    1.82 -          end
    1.83 -          ui.field.select{
    1.84 -            container_attr = { style = "display: inline-block; width: 3em;" },
    1.85 -            name = "notification_hour",
    1.86 -            foreign_records = foreign_records,
    1.87 -            foreign_id = "id",
    1.88 -            foreign_name = "name"
    1.89 -          }
    1.90 +            
    1.91 +            slot.put(" ")
    1.92 +
    1.93 +            ui.tag{ content = _"Hour:" }
    1.94 +            slot.put(" ")
    1.95 +            local foreign_records = {}
    1.96 +            for i = 0, 23 do
    1.97 +              foreign_records[#foreign_records+1] = {
    1.98 +                id = i,
    1.99 +                name = string.format("%02d", i),
   1.100 +              }
   1.101 +            end
   1.102 +            ui.field.select{
   1.103 +              container_attr = { style = "display: inline-block; width: 3em; vertical-align: middle;" },
   1.104 +              name = "notification_hour",
   1.105 +              foreign_records = foreign_records,
   1.106 +              foreign_id = "id",
   1.107 +              foreign_name = "name"
   1.108 +            }
   1.109 +          end }
   1.110 +          
   1.111 +          ui.container{ content = function()
   1.112 +            ui.tag{
   1.113 +              tag = "input", 
   1.114 +              attr = {
   1.115 +                id = "digest_off",
   1.116 +                type = "radio", name = "digest", value = "false",
   1.117 +                checked = not app.session.member.digest_dow and "checked" or nil
   1.118 +              }
   1.119 +            }
   1.120 +            ui.tag{
   1.121 +              tag = "label", attr = { ['for'] = "digest_off" },
   1.122 +              content = _"Send me only updates on issue phase changes"
   1.123 +            }
   1.124 +          end }
   1.125          end }
   1.126          
   1.127 -        ui.container{ content = function()
   1.128 -          ui.tag{
   1.129 -            tag = "input", 
   1.130 -            attr = {
   1.131 -              id = "digest_off",
   1.132 -              type = "radio", name = "digest", value = "false",
   1.133 -              checked = not app.session.member.digest_dow and "checked" or nil
   1.134 -            }
   1.135 -          }
   1.136 -          ui.tag{
   1.137 -            tag = "label", attr = { ['for'] = "digest_off" },
   1.138 -            content = _"Send me only updates on issue phase changes"
   1.139 -          }
   1.140 -        end }
   1.141 -        
   1.142 -        
   1.143          
   1.144          ui.container{ content = function()
   1.145            ui.tag{

Impressum / About Us