liquid_feedback_frontend
diff app/main/initiative/new.lua @ 1092:5b65ea5c24f5
Fixed free timings in poll mode
| author | bsw |
|---|---|
| date | Fri Oct 17 13:03:31 2014 +0200 (2014-10-17) |
| parents | 20680a81c3e1 |
| children | 9604ba51624a |
line diff
1.1 --- a/app/main/initiative/new.lua Fri Oct 17 11:30:09 2014 +0200 1.2 +++ b/app/main/initiative/new.lua Fri Oct 17 13:03:31 2014 +0200 1.3 @@ -75,12 +75,16 @@ 1.4 if not issue then 1.5 ui.container { content = policy.name } 1.6 end 1.7 + if param.get("free_timing") then 1.8 + ui.container { content = param.get("free_timing") } 1.9 + end 1.10 slot.put("<br />") 1.11 1.12 ui.field.hidden{ name = "formatting_engine", value = param.get("formatting_engine") } 1.13 ui.field.hidden{ name = "policy_id", value = param.get("policy_id") } 1.14 ui.field.hidden{ name = "name", value = param.get("name") } 1.15 ui.field.hidden{ name = "draft", value = param.get("draft") } 1.16 + ui.field.hidden{ name = "free_timing", value = param.get("free_timing") } 1.17 local formatting_engine 1.18 if config.enforce_formatting_engine then 1.19 formatting_engine = config.enforce_formatting_engine 1.20 @@ -165,30 +169,28 @@ 1.21 value = param.get("policy_id", atom.integer) or area.default_policy and area.default_policy.id 1.22 } 1.23 if policy and policy.free_timeable then 1.24 - ui.sectionRow( function() 1.25 - local available_timings 1.26 - if config.free_timing and config.free_timing.available_func then 1.27 - available_timings = config.free_timing.available_func(policy) 1.28 - if available_timings == false then 1.29 - error("error in free timing config") 1.30 - end 1.31 - end 1.32 - ui.heading{ level = 4, content = _"Free timing:" } 1.33 - if available_timings then 1.34 - ui.field.select{ 1.35 - name = "free_timing", 1.36 - foreign_records = available_timings, 1.37 - foreign_id = "id", 1.38 - foreign_name = "name", 1.39 - value = param.get("free_timing") 1.40 - } 1.41 - else 1.42 - ui.field.text{ 1.43 - name = "free_timing", 1.44 - value = param.get("free_timing") 1.45 - } 1.46 - end 1.47 - end ) 1.48 + local available_timings 1.49 + if config.free_timing and config.free_timing.available_func then 1.50 + available_timings = config.free_timing.available_func(policy) 1.51 + if available_timings == false then 1.52 + error("error in free timing config") 1.53 + end 1.54 + end 1.55 + ui.heading{ level = 4, content = _"Free timing:" } 1.56 + if available_timings then 1.57 + ui.field.select{ 1.58 + name = "free_timing", 1.59 + foreign_records = available_timings, 1.60 + foreign_id = "id", 1.61 + foreign_name = "name", 1.62 + value = param.get("free_timing") 1.63 + } 1.64 + else 1.65 + ui.field.text{ 1.66 + name = "free_timing", 1.67 + value = param.get("free_timing") 1.68 + } 1.69 + end 1.70 end 1.71 end 1.72