LuCI - OpenWrt Configuration Interface
Find a file
Jo-Philipp Wich 1c09ee5e42 luci-mod-system: fix SimpleForm usage on file editing pages
When a value identical to the stored one is submitted, the CBI framework
will not emit an option write event and therfore not store the value in
the form data dictionary passed to SimpleForm.handle().

This usage pattern usally works be accident for file editor views such
as admin_system/crontab because \r\n windows style line endings are
substituted with unix \n ones before writing the data, defeating the
equality check in CBI.

When a single line without trailing newline is submitted however, the
CBI will not see a difference to the data stored in the file and clear
out the value on subsequent saves.

This commit alignes the logic used by various SimpleForm views to
behave identically and predictable:

 - File data is handled in the SimpleForm.handle() callback
 - The forcewrite property is used to disable equality checks
 - Submission of an empty string empties the backing file

Fixes: #2737
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-06-05 16:15:40 +02:00
applications luci-app-mwan3: change flush_conntrack option to list option 2019-06-03 14:22:54 +02:00
build build: i18n-scan.pl: properly handle bracket-quoted strings 2019-05-31 20:11:56 +02:00
collections Merge pull request #2285 from dengqf6/luci-ssl-nginx 2018-12-11 06:56:35 +01:00
contrib/package lucihttp: update to latest Git HEAD 2019-06-05 16:15:40 +02:00
documentation docs: Update UCI wiki link 2019-01-05 11:00:55 +00:00
libs luci-app-radicale2: Add v2 of CalDAV/CardDAV server 2019-01-10 05:52:12 -05:00
modules luci-mod-system: fix SimpleForm usage on file editing pages 2019-06-05 16:15:40 +02:00
protocols Merge pull request #2424 from LuKePicci/luci-proto-ppp_pppoe_host-uniq 2019-01-21 20:14:31 +01:00
themes Merge pull request #2746 from TDT-AG/pr/20190603-luci-theme-material 2019-06-04 15:17:50 +02:00
.buildpath * new project: ff-luci - Freifunk Lua Configuration Interface 2008-03-02 21:52:58 +00:00
.cproject More C-Functions (luci.cutil.instanceof, luci.cutil.pcdata) 2008-11-20 19:22:05 +00:00
.gitignore build: add build option to minify *.js files 2018-11-22 12:49:14 +01:00
.project LuCI Core C-Rewrite: First steps 2008-11-19 23:02:36 +00:00
CONTRIBUTING.md Update CONTRIBUTING.md 2018-12-10 17:54:55 +02:00
LICENSE * new project: ff-luci - Freifunk Lua Configuration Interface 2008-03-02 21:52:58 +00:00
luci.mk Added privoxy Hindi translations 2019-05-29 21:51:49 +05:30
NOTICE Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
README.md docs: link to the developer wiki documentation 2016-09-07 17:10:05 +00:00

OpenWrt luci feed

Description

This is the OpenWrt "luci"-feed containing LuCI - OpenWrt Configuration Interface.

Usage

This feed is enabled by default. Your feeds.conf.default (or feeds.conf) should contain a line like:

src-git luci https://github.com/openwrt/luci.git

To install all its package definitions, run:

./scripts/feeds update luci
./scripts/feeds install -a -p luci

API Reference

You can browse the generated API documentation directly on Github.

Development

Documentation for developing and extending LuCI can be found in the Wiki

License

See LICENSE file.

Package Guidelines

See CONTRIBUTING.md file.