summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/cbi/browser.htm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi/browser.htm')
-rw-r--r--modules/luci-base/luasrc/view/cbi/browser.htm14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/browser.htm b/modules/luci-base/luasrc/view/cbi/browser.htm
index 362c40bec1..eb47ffafe6 100644
--- a/modules/luci-base/luasrc/view/cbi/browser.htm
+++ b/modules/luci-base/luasrc/view/cbi/browser.htm
@@ -1,8 +1,10 @@
-<% local v = self:cfgvalue(section) or self.default -%>
<%+cbi/valueheader%>
- <input class="cbi-input-text" type="text"<%= attr("value", v) .. attr("name", cbid) .. attr("id", cbid) %> />
- <script type="text/javascript">
-cbi_init()
-cbi_browser_init('<%=cbid%>', '<%=resource%>', '<%=url('admin/filebrowser')%>'<%=self.default_path and ", '"..self.default_path.."'"%>);
- </script>
+
+<input class="cbi-input-text" type="text"<%=
+ attr("id", cbid) ..
+ attr("name", cbid) ..
+ attr("value", self:cfgvalue(section) or self.default) ..
+ attr("data-browser", self.default_path or "")
+%> />
+
<%+cbi/valuefooter%>