summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-06-27 19:38:35 +0000
committerJo-Philipp Wich <jow@openwrt.org>2014-06-30 13:41:28 +0200
commit501640081f58deec167cc44251e14e78ace710bb (patch)
treee59ea27d72e65e54ac7bff400b893be7335d5305
parentb7bde2e0ae9f21a3726fd6567e2b5eacbb8dbb92 (diff)
downloadluci2-ui-501640081f58deec167cc44251e14e78ace710bb.tar.gz
luci2: UCIContext: add: respect "name" if passed
This allows creating UCI entries with a desired name, e.g. config interface 'guestlan' Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-rw-r--r--luci2/htdocs/luci2/luci2.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js
index 2a2a359..040f1e5 100644
--- a/luci2/htdocs/luci2/luci2.js
+++ b/luci2/htdocs/luci2/luci2.js
@@ -974,7 +974,7 @@ function LuCI2()
add: function(conf, type, name)
{
var n = this.state.creates;
- var sid = this.createSID(conf);
+ var sid = name || this.createSID(conf);
if (!n[conf])
n[conf] = { };