Age | Commit message (Collapse) | Author |
|
Modern browsers allow decomposing table markup equally well as nested div
constructs, therefor migrate our <div> table markup to actual <table> tags
but keep the old table/tr/th/td CSS classes for now to allow for a smooth
theme transition.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: 2b99473f2 ("luci-base: tools.widget.NetworkSelect: disallow invalid network names")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #4523, #4573
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
luci-base: Fix using isActive in widget-change notification.
|
|
The `onchange` notification handler is called too early to be able to
evaluate other widget's `isActive()` status. Solve this by changing order
of event handling - first register/execute `map.checkDepends` and then
`onchange`.
Fixes: openwrt/luci#4516.
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
|
|
The legend HTML element is allowed only as first element in fieldset, so
use h3 instead, which is rendered the same within themes.
Fixes #3149.
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
|
|
Iterate through VLANs to get the clients connected on configured wifi
VLANs (as configured by `wifi-vlan` sections in `wireless` configuration).
This is a minimum support for VLANs on wireless network. The VLAN name is
nowhere displayed, but at least clients using VLANs are visible.
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
|
|
It was a cosmetic feature that doesn't work anymore with the latest
uhttpd ubus API. Adding RESTful API resulted in treating URL part
following the /ubus/ as the new API request.
Suggested-by: Rafał Miłecki <rafal@milecki.pl>
Fixes: #4465
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
We must be able to translate these values.
Fixes: fd75c2b7c ("luci-base: add default value options dhcp hostname")
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
|
|
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
|
Fixes: #4430
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Sending GET request to the main RPC base URL and expecting HTTP response
code 400 had two flaws:
1. It was not verifying actual JSON-RPC interface availability
2. It did not allow implementing support for new requests
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Jo-Philipp Wich <jo@mein.io>
|
|
The `getOption()` function allows to easily obtain a reference to another
option object instance within the same section.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The new `isChanged()` utility functions allows to query the dirty state
of an ui input widget.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This commit introduces new per-section cfgvalue(), formvalue() and
getUIElement() helper functions which complement the respective per-option
functions.
Their intent is to simplify querying input data or obtaining UI widget
instances from other options within the same section.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a new, widget agnostic onchange property which allows setting
custom handler functions to react on element value changes.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Since option deletions are sent first, followed by ubus set commands,
a call sequence like:
uci.set('config', 'section', 'option', ['foo', 'bar'])
uci.set('config', 'section', 'option', ['foo'])
uci.unset('config', 'section', 'option')
... would result in the option retainining `foo` as value, instead of it
getting removed as one would expect.
Fix this issue by reverting the internal change state of the option before
storing the deletion.
While we're at it, also rework the internal tracking of deleted options to
not result in duplicate removal requests when the same option is unset
several times.
Finally change all `undefined` returns to `null` in order to comply with
the function documentation.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The user list was appended to the dropdown again each time the page is loaded.
Signed-off-by: Helge Mader <ma@dev.tdt.de>
|
|
The previous server side menu rendering ordered items first by their order
weight value, then by their internal name.
Do the same for client side menu rendering.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #4020, #4022, #4111
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #4093
Fixes: 4052436d8 ("luci-base: firewall.js: don't treat zone name as network fallback")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fix "SyntaxError: Strict mode does not allow function declarations
in a lexically nested statement" error that may occur in some old
browsers (detected on QtWebKit 5.212).
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
|
|
luci-base: fix host validation function
|
|
Allow only ipv4 or ipv6 addresses without IP mask.
A host IP with mask does not make sense in this context.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
|
Fixes: #4055
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This is useful for custom subclasses that want to perform conditional
rendering of contents, depending on the parent section ID.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: d02c26772 ("luci-base: ui.js: rework password input handling")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #3989
Fixes: 81effc111 ("luci-base: ui.js: assume select widget by default for ListValue widget")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Get rid of dummy element
- Render password field as text input initially and later transform
it to a password field
- Use .control-group markup to allow better styling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #3973
Fixes: 2fb55e1ab ("luci-base: ui.js: fixes for radio widget type of select element")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://forum.openwrt.org/t/luci-rpc-error/61760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://forum.openwrt.org/t/luci-rpc-error/61760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Since we're already have LuCI.session.getID() we should mirror the same
interface for retrieving the session token.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Process deletions before additions or changes, allowing user code to
remove and recreate a section with the same name.
- Only record section deletions when the section to be removed actually
existed in the original config or when it was staged for creation
earlier. This avoids stray ubus not found exception when saving.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add 'nodescriptions' property to the TableSection class that allows
to disable displaying table header row with descriptions.
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
|