[luci] SimpleForm,section and configs questions
spam at klub.com.pl
spam at klub.com.pl
Tue Jan 5 23:44:47 CET 2010
Hi,
I'm working on LuCI-based GUI for tunnels configuration and I've hit
several problems that I can't resolve. I would be very thankful
if someone could help me with this.
1. Editing several config files on 1 page
Configuration is stored in several configs: tunnel1, tunnel2.
(Config file layout does not depend on me, so I can't change it.)
I'd like to have one page that allows configuration of values in 2
config files. Is there any way to do that, except creating SimpleForm
and painfully reading each field manually (using several calls like
luci.model.uci.cursor():get("config1", "section1","option1")?
2. Sections in SimpleForm
My page will have lots of parameters and I'd like to group them.
Is there a way to declare Sections in SimpleForm?
3. Hiding whole section
It's possible to hide certain fields depending on value of other
parameters. For example, if my tunnelMode is set to DHCP, I want to
hide tunnelEndpoint field. This can be done easily:
tunnelEndpoint:depends("tunnelMode","manual")
Is there a way to hide whole section in the same manner?
http://luci.subsignal.org/trac/wiki/Documentation/CBI states that
TypedSection has :depends() property. However, when I set it (and the
dependency is not met), the section itself is still visible, but does not
contain any fields.
4. Documentation
Is there more complete reference available than what is here:
http://luci.subsignal.org/trac/wiki/Documentation?
I've found that there is a class Form. Does it offer more than SimpleForm?
What does SimpleForm offers?
Thanks in advance for your time.
Tomek
More information about the luci
mailing list