luci-base: add 'create' boolean to MultiValue form widget
authorPaul Donald <newtwen+github@gmail.com>
Tue, 22 Oct 2024 23:01:50 +0000 (01:01 +0200)
committerPaul Donald <newtwen+github@gmail.com>
Tue, 22 Oct 2024 23:13:04 +0000 (01:13 +0200)
commitaf48efd4f86e09210ea38356facd8c114feab7b9
tree73c092205e751578c8232e424e2f9e135de6aabe
parent1f32729428b4a859399c03efd255d7ae61a7b2b8
luci-base: add 'create' boolean to MultiValue form widget

Enables creation of custom choices.

example usage:

o = s.taboption('thistab', form.MultiValue, 'myoption');
o.create = true;

Form element now presents additional ' -- custom -- ' entry.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
modules/luci-base/htdocs/luci-static/resources/form.js