[luci] Complicated Form
Jo-Philipp Wich
xm at subsignal.org
Fri Feb 3 14:31:02 CET 2012
Am 26.01.12 16:01, schrieb Grzegorz Głowacki:
> Hi, I want to create i say "quick setup" form, with a few mouse
> clicks user will configure wireless and network settings. Networks
> settings includes creating a network, firewall rules etc... Network
> Network settings depend on the wireless mode and network
> configuration requires creating uci sections, which doesn't exist
> before selecting wireless mode. I can't figure out, how to create
> such a form. When I tried to create o 2 map form, I couldn't show
> network section (because it doesn't exist) when I tried to create 2
> simpleform form, i can't make them work together, when i try to save
> settings, I can't for example retrieve mode selection from network
> simpleform. I also tried to create a kind of wizard form, but i don't
> know how to pass argument to then second form.
Hi,
to design such a form you'll need a lot of CBI overrides since the
underlying UCI structure needs a bit of mangling to work the way you
want it.
I would recommend a SimpleForm here which is not tied to any particular
config, populate its configurations with a few key values from uci
(like the identifiers of the existing radios) and calculate the
required changes on the server side.
One example of such a wizzard application was the "freifunk wizzard"
which helped setting up an OLSR mesh:
http://luci.subsignal.org/trac/browser/luci/tags/0.9.0/applications/luci-ffwizard-leipzig
It might also help if you post some examples of your failed approaches
here so we can go through it and see where they need to be modified.
~ Jow
More information about the luci
mailing list