mirror of
https://github.com/openwrt/luci
synced 2025-01-09 04:28:37 +08:00
22cccf7b04
This augments CBITableSection, affecting types which extend it, i.e. CBIGridSection. Setting a table 'cloneable' property to true reveals a column of clone buttons who designate the current entry as a clone source. Clicking the clone button duplicates the data of that section_id into a new entry, while the new entry gets a new and unique SID. E.g. s = m.section(form.GridSection, 'foo', _('Bar')); ... s.cloneable = true; Clone and add actions differ: clone will not open a dialogue. That is a user exercise. One may set the put_next flag to false to put the new clone last, or true to put it next (after the clone source). This uses a new uci action which fulfills the behaviour: clone It is possible for the uci clone action to be used independently. See also: https://forum.openwrt.org/t/add-clone-button-to-luci-configurations-esp-in-firewall/196232 Signed-off-by: Paul Donald <newtwen+github@gmail.com> |
||
---|---|---|
.. | ||
luci-base | ||
luci-compat | ||
luci-lua-runtime | ||
luci-mod-admin-full | ||
luci-mod-battstatus | ||
luci-mod-dashboard | ||
luci-mod-dsl | ||
luci-mod-network | ||
luci-mod-rpc | ||
luci-mod-status | ||
luci-mod-system |