libs/cbi: fix bug in form prefill of zone picker widgets

This commit is contained in:
Jo-Philipp Wich 2009-11-08 02:31:19 +00:00
parent 6ba1aef019
commit 9199b2ca02

View file

@ -81,7 +81,7 @@ $Id$
<input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="radio"<%=attr("id", cbid .. "_new") .. attr("name", cbid) .. attr("value", "-") .. ifattr(not selected, "checked", "checked")%> /> &nbsp;
<div style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em; display:inline">
<label<%=attr("for", cbid .. "_new")%>><em><%:unspecified -or- create:%>&nbsp;</em></label>
<input style="width:6em" type="text"<%=attr("name", cbid .. ".newzone") .. ifattr(not selected, "value", self.default)%> onfocus="document.getElementById('<%=cbid%>_new').checked=true" />
<input style="width:6em" type="text"<%=attr("name", cbid .. ".newzone") .. ifattr(not selected, "value", luci.http.formvalue(cbid .. ".newzone") or self.default)%> onfocus="document.getElementById('<%=cbid%>_new').checked=true" />
</div>
</li>
<% end %>