diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-21 20:51:32 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-21 20:51:32 +0000 |
commit | 63089ef8be99dbbc4e64e859359e6cd9a562dcf1 (patch) | |
tree | eb3b65a44d0344d8a91d1d8b983fdb9e7cdf1338 /libs/web | |
parent | 98b4da49b0f7af5bc52e8a7da8eaa759e5fda0e2 (diff) |
libs/web: annotate form object with cbi state when using section add/remove buttons
Diffstat (limited to 'libs/web')
-rw-r--r-- | libs/web/luasrc/view/cbi/tblsection.htm | 4 | ||||
-rw-r--r-- | libs/web/luasrc/view/cbi/tsection.htm | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/web/luasrc/view/cbi/tblsection.htm b/libs/web/luasrc/view/cbi/tblsection.htm index 0224610674..f5e01de025 100644 --- a/libs/web/luasrc/view/cbi/tblsection.htm +++ b/libs/web/luasrc/view/cbi/tblsection.htm @@ -92,7 +92,7 @@ end <%- end -%> " title="<%:Edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:Edit%>" /></a> <%- end; if self.addremove then %> - <input type="image" value="<%:Delete%>" name="cbi.rts.<%=self.config%>.<%=k%>" alt="<%:Delete%>" title="<%:Delete%>" src="<%=resource%>/cbi/remove.gif" /> + <input type="image" value="<%:Delete%>" onclick="this.form.cbi_state='del-section'; return true" name="cbi.rts.<%=self.config%>.<%=k%>" alt="<%:Delete%>" title="<%:Delete%>" src="<%=resource%>/cbi/remove.gif" /> <%- end -%> </td> <%- end -%> @@ -122,7 +122,7 @@ end <% else %> <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %> <input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" /> - <input class="cbi-button cbi-button-add" type="submit" value="<%:Add%>" title="<%:Add%>" /> + <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> <%- end %> diff --git a/libs/web/luasrc/view/cbi/tsection.htm b/libs/web/luasrc/view/cbi/tsection.htm index 0fa285c160..9361b6d41e 100644 --- a/libs/web/luasrc/view/cbi/tsection.htm +++ b/libs/web/luasrc/view/cbi/tsection.htm @@ -21,7 +21,7 @@ $Id$ <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%> <% if self.addremove then -%> <div class="cbi-section-remove right"> - <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" value="<%:Delete%>" /> + <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" onclick="this.form.cbi_state='del-section'; return true" value="<%:Delete%>" /> </div> <%- end %> @@ -51,7 +51,7 @@ $Id$ <%- else -%> <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %> <input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" /> - <input type="submit" class="cbi-button cbi-button-add" value="<%:Add%>" /> + <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> <%- end %> |