[luci] how to transform multi input to one uci cfgvalue
Michael Fung
mike at cmsweb.com
Sat Feb 28 02:47:26 CET 2009
>
> Hi Jo,
>
> I want two fields to act as one logical option.
>
> Web form:
> Hour: ___ Minute: ___
>
> Correspond to one uci config option 'time', like:
> option 'time' '16:55'
>
I think of two solutions to my problem.
1. Tweak at the template level. May be add a template properties to the Value object, so that I can set value.template = custom_template, and at custom_template.htm I can make the "time" input hidden, and write onchange scripts for the "hour" and "minute" input to modify the time value.
2. Tweak at the LuCI CBI code. Add a "hidden" properties to Value class. Add a "Non-UCI Value" object to handle the "hour" and "minute" field and let us override certain functions to set and save the field values to/from the "time" value.
But I have no experience with Lua so hopefully the developers can consider it.
Rgds,
Michael
More information about the luci
mailing list