From c78e445583bb49907f18888b2747db5fd84e0f97 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 9 Aug 2012 23:42:53 +0000 Subject: libs/web: rework unspecified/create logic for checkboxes in network_netlist widget --- libs/web/luasrc/view/cbi/network_netlist.htm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libs/web/luasrc/view') diff --git a/libs/web/luasrc/view/cbi/network_netlist.htm b/libs/web/luasrc/view/cbi/network_netlist.htm index 8568ced447..8013f2cc08 100644 --- a/libs/web/luasrc/view/cbi/network_netlist.htm +++ b/libs/web/luasrc/view/cbi/network_netlist.htm @@ -49,9 +49,14 @@ <% if not self.nocreate then %>
  • - " onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "_new") .. attr("name", cbid) .. attr("value", "-") .. ifattr(not value, "checked", "checked")%> />   + " onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "_new") .. attr("name", cbid) .. attr("value", "-") .. ifattr(not value and self.widget ~= "checkbox", "checked", "checked")%> />  
    - ><%:unspecified -or- create:%>  + > + <%- if self.widget == "checkbox" then -%> + <%:create:%> + <%- else -%> + <%:unspecified -or- create:%> + <%- end -%>  onfocus="document.getElementById('<%=cbid%>_new').checked=true" />
  • -- cgit v1.2.3