summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/cbi/tblsection.htm
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-02-10 18:11:49 +0100
committerJo-Philipp Wich <jow@openwrt.org>2016-02-10 18:11:49 +0100
commit6d126649f01ac817149d4f36324c161bb1a4650b (patch)
treeb941064af6f43c20b6a8bd2a7bc7b97f859fadce /modules/luci-base/luasrc/view/cbi/tblsection.htm
parent4990ec831c7190946106d5073c02ad85616c04b8 (diff)
luci-base: cbi: further refactoring
Eliminate more inline scripts in favor to global initialization, use a global object for sharing fixed strings instead of passing them to each invocation. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi/tblsection.htm')
-rw-r--r--modules/luci-base/luasrc/view/cbi/tblsection.htm3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/tblsection.htm b/modules/luci-base/luasrc/view/cbi/tblsection.htm
index fcf216125..26d13f937 100644
--- a/modules/luci-base/luasrc/view/cbi/tblsection.htm
+++ b/modules/luci-base/luasrc/view/cbi/tblsection.htm
@@ -131,8 +131,7 @@ end
<input class="cbi-button cbi-button-add" type="submit" value="<%:Add%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" title="<%:Add%>" />
<% else %>
<% if self.invalid_cts then -%><div class="cbi-section-error"><% end %>
- <input type="text" class="cbi-section-create-name" id="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" />
- <script type="text/javascript">cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>', true, 'uciname');</script>
+ <input type="text" class="cbi-section-create-name" id="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" data-type="uciname" data-optional="true" />
<input class="cbi-button cbi-button-add" type="submit" onclick="this.form.cbi_state='add-section'; return true" value="<%:Add%>" title="<%:Add%>" />
<% if self.invalid_cts then -%>
<br /><%:Invalid%></div>