libs/web: sent origin section id encoded in cbi.cts. requests
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 9 Oct 2011 20:14:25 +0000 (20:14 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 9 Oct 2011 20:14:25 +0000 (20:14 +0000)
libs/web/luasrc/view/cbi/tblsection.htm
libs/web/luasrc/view/cbi/tsection.htm

index 6633b9bba41e62092ad813b9b3413da16c23b3dc..1a2d689a7ea9222a35f0209abf4dcf725ea85aa4 100644 (file)
@@ -128,11 +128,11 @@ end
                        <% if self.template_addremove then include(self.template_addremove) else -%>
                        <div class="cbi-section-create cbi-tblsection-create">
                                <% if self.anonymous then %>
-                                       <input class="cbi-button cbi-button-add" type="submit" value="<%:Add%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" title="<%:Add%>" />
+                                       <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%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
-                                       <script type="text/javascript">cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>', 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%>" />
+                                       <script type="text/javascript">cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>', true, 'uciname');</script>
                                        <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>
index 24f8e0400f8235677666f93c683076c9257dc885..087548bf2888c74cbf360e9fb331735df2497ea0 100644 (file)
                <% if self.template_addremove then include(self.template_addremove) else -%>
                <div class="cbi-section-create">
                        <% if self.anonymous then -%>
-                               <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" value="<%:Add%>" />
+                               <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%: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%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
-                               <script type="text/javascript">cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>', 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%>" />
+                               <script type="text/javascript">cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>', true, 'uciname');</script>
                                <input type="submit" class="cbi-button cbi-button-add" onclick="this.form.cbi_state='add-section'; return true" value="<%:Add%>" />
                                <% if self.invalid_cts then -%>
                                        <br /><%:Invalid%></div>