Jo-Philipp Wich
848e43a5b4
remove .i18n annotations from controller files
2012-11-26 12:53:43 +00:00
Jo-Philipp Wich
a4996261ea
libs/web: remove debugging code
2012-01-08 23:39:29 +00:00
Jo-Philipp Wich
875baa244a
libs/web: allow zero-length string literals when parsing datatypes
2012-01-08 23:36:35 +00:00
Jo-Philipp Wich
9fcdf0fe81
libs/web: introduce recursive expression support for datatypes, introduce "or" and "and" datatypes
...
The commit adds a recursive parser for datatype expressions which allows nesting of validators,
this allows for complex expressions like "list(or(range(0,65535),'infinite'))" to allow a list of
values which are either integers between 0 and 65535 or the literal string "inifinite".
That change also deprecates combined datatypes like "ipaddr" ["or(ip4addr,ip6addr)"] or
"host" ["or(hostname,ip4addr,ip6addr)"]
2012-01-08 23:33:47 +00:00
Jo-Philipp Wich
3553d308f6
[PATCH] Naive fix for bug #208
...
For SimpleSection, use the section name (always "1") instead of the
section type in the CBI-like string used to identify the upload. This
allows upload fields to be placed in SimpleSections. The fix changes a
minimal number of lines, but does introduce some unnecessary confusion,
it may or may not be better than a more thorough/invasive fix.
Set the enctype for the form element in the simpleform view to be
multipart/form-data because the default
application/x-www-form-urlencoded does not support input files.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2011-12-20 17:52:10 +00:00
Jo-Philipp Wich
e12b8dbc1f
libs/web: move ifattr() and attr() helpers into dispatcher scope to make them avilable to all templates, remove duplicate exports in cbi tempalte scope
2011-10-26 02:17:45 +00:00
Jo-Philipp Wich
4fb5f1aca6
libs/web: pass origin section id to :create() callback, needed when multiple, filtered TypedSection instances of the same type are used within a single Map
2011-10-09 20:07:02 +00:00
Jo-Philipp Wich
96dd29753c
libs/web: cbi: provide a "last_child" property to allow for more layout control in form rendering
2011-09-22 16:33:28 +00:00
Jo-Philipp Wich
be5b1015b2
libs/web: improve cbi handling of Flag values, support usage of .default attribute to signalize default-on checkboxes, this helps to deal with the reversed logic of various uci bools within OpenWrt configs
2011-01-29 17:54:00 +00:00
Jo-Philipp Wich
80e1900b03
libs/web: implement sortable rows for uci reordering
2011-01-20 00:01:55 +00:00
Jo-Philipp Wich
6c84824d79
libs/web: handle empty tables in Map.set()
2010-12-05 00:54:18 +00:00
Jo-Philipp Wich
2a0903bc50
libs/web: fix dynamic list handling
2010-12-03 12:41:12 +00:00
Jo-Philipp Wich
9c3db58ee4
libs/web: combine apply actions of all maps on a page, prevents concurrent XHR
2010-11-22 00:32:54 +00:00
Jo-Philipp Wich
be385bfcc6
libs/web: better server side handling of DynList values
2010-11-20 18:35:44 +00:00
Jo-Philipp Wich
ff58e81d18
libs/web: skip empty values in DynList widget
2010-11-20 18:08:18 +00:00
Jo-Philipp Wich
c20dcb3612
libs/web: add range(min,max) datatype validator
2010-11-16 18:48:02 +00:00
Jo-Philipp Wich
bc78f7e08d
libs/web: implement forcewrite attribute for cbi options
2010-10-30 02:30:09 +00:00
Jo-Philipp Wich
70706cf388
libs/web: rework DynamicList widget
2010-10-25 17:04:03 +00:00
Jo-Philipp Wich
fbaabd7d93
libs/web: cbi: add new on_before_save and on_after_save hook, implement :reset_values() for options supporting :value()
2010-10-14 23:21:25 +00:00
Jo-Philipp Wich
8038cbf004
libs/web: fix various issues in cbi option error handling, call validator for missing options to obtain error message
2010-10-14 00:18:28 +00:00
Jo-Philipp Wich
17575b4d75
libs/web: rework cbi field validation, let validators return custom error messages, properly handle errors in multiple sections
2010-10-12 23:08:54 +00:00
Jo-Philipp Wich
ede4aca4b9
libs: merge libs/cbi into libs/web
2010-10-12 05:15:32 +00:00