Mercurial > prosody-modules
comparison mod_vjud/mod_vjud.lua @ 787:cec49ee88c23
mod_vjud: Correctly pass current state to form (Thanks Florob)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 09 Aug 2012 19:49:50 +0200 |
| parents | da8f561d79b4 |
| children | 7e40d6680093 |
comparison
equal
deleted
inserted
replaced
| 786:e318a341d332 | 787:cec49ee88c23 |
|---|---|
| 142 opted_in[username] = fields.searchable or nil | 142 opted_in[username] = fields.searchable or nil |
| 143 | 143 |
| 144 return { status = "completed" } | 144 return { status = "completed" } |
| 145 else -- No state, send the form. | 145 else -- No state, send the form. |
| 146 return { status = "executing", actions = { "complete" }, | 146 return { status = "executing", actions = { "complete" }, |
| 147 form = { layout = opt_in_layout, data = { searchable = opted_in[username] } } }, true; | 147 form = { layout = opt_in_layout, values = { searchable = opted_in[username] } } }, true; |
| 148 end | 148 end |
| 149 end | 149 end |
| 150 | 150 |
| 151 local adhoc_new = module:require "adhoc".new; | 151 local adhoc_new = module:require "adhoc".new; |
| 152 local adhoc_vjudsetup = adhoc_new("Search settings", "vjudsetup", opt_in_handler);--, "self");-- and nil); | 152 local adhoc_vjudsetup = adhoc_new("Search settings", "vjudsetup", opt_in_handler);--, "self");-- and nil); |
