Changeset 5668
- Timestamp:
- 02/23/10 21:24:43 (3 years ago)
- Location:
- luci2/cbi2
- Files:
-
- 2 modified
- 1 moved
-
Makefile (modified) (1 diff)
-
network.luci (modified) (1 diff)
-
widgets/tsection.c (moved) (moved from luci2/cbi2/widgets/stemplate.c) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
luci2/cbi2/Makefile
r5667 r5668 11 11 $(CC) $(CFLAGS) -o $@ $^ 12 12 13 luci: luci.c cbi.c validate.c uvl.c blob.c widget.c validator/boolean.c widgets/page.c widgets/form.c widgets/section.c widgets/option.c widgets/field.c widgets/foreach.c widgets/file.c widgets/ stemplate.c13 luci: luci.c cbi.c validate.c uvl.c blob.c widget.c validator/boolean.c widgets/page.c widgets/form.c widgets/section.c widgets/option.c widgets/field.c widgets/foreach.c widgets/file.c widgets/tsection.c 14 14 $(CC) $(CFLAGS) -o $@ $^ 15 15 -
luci2/cbi2/network.luci
r5666 r5668 20 20 </luci:page> 21 21 22 <luci: stemplatepackage="network" uci="interface">22 <luci:tsection package="network" uci="interface"> 23 23 <luci:title>Lan Configuration</luci:title> 24 24 Lan Configuration description 25 25 <luci:option uci="ipaddr">IP</luci:option> 26 26 <luci:option uci="netmask" >Netmask</luci:option> 27 </luci: stemplate>27 </luci:tsection> 28 28 29 <luci: stemplatepackage="dhcp" uci="leases">29 <luci:tsection package="dhcp" uci="leases"> 30 30 <luci:title>DHCP lease</luci:title> 31 31 <luci:option uci="ipaddr">IP</luci:option> 32 32 <luci:option uci="netmask" >Netmask</luci:option> 33 </luci: stemplate>33 </luci:tsection> 34 34 35 35 <luci:page uci="network"> -
luci2/cbi2/widgets/tsection.c
r5666 r5668 1 1 #include "../cbi.h" 2 2 3 int stemplate_init(struct cbi_ctx *ctx, struct cbi_element *e)3 int tsection_init(struct cbi_ctx *ctx, struct cbi_element *e) 4 4 { 5 5 return 0; 6 6 } 7 7 8 struct cbi_widget_property stemplate_props[] = {8 struct cbi_widget_property tsection_props[] = { 9 9 { "uci", PROP_REQUIRED }, 10 10 { "id", PROP_REQUIRED }, … … 13 13 }; 14 14 15 struct cbi_widget stemplate= {15 struct cbi_widget tsection = { 16 16 .caps = CAP_UCI | CAP_SECTION | CAP_TEMPLATE, 17 17 .parent_caps = CAP_PACKAGE, 18 .props = stemplate_props,19 .init = stemplate_init,18 .props = tsection_props, 19 .init = tsection_init, 20 20 }; 21 21 22 WIDGET( stemplate)22 WIDGET(tsection)
