luci-base: render default values for all server side cbi map widgets
Fixes: 9c7eb1dec
("luci-base: switch from server side to client side widget markup")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
9c736c8392
commit
5510bdae39
4 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
<%+cbi/valueheader%>
|
||||
<div<%=attr("data-ui-widget", luci.util.serialize_json({
|
||||
"Dropdown", self:cfgvalue(section), self:choices(), {
|
||||
"Dropdown", self:cfgvalue(section) or self.default, self:choices(), {
|
||||
id = cbid,
|
||||
name = cbid,
|
||||
sort = self.keylist,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%+cbi/valueheader%>
|
||||
<div<%=attr("data-ui-widget", luci.util.serialize_json({
|
||||
"DynamicList", self:cfgvalue(section), self:choices(), {
|
||||
"DynamicList", self:cfgvalue(section) or self.default, self:choices(), {
|
||||
name = cbid,
|
||||
size = self.size,
|
||||
sort = self.keylist,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%+cbi/valueheader%>
|
||||
<div<%=attr("data-ui-widget", luci.util.serialize_json({
|
||||
"Select", self:cfgvalue(section), self:choices(), {
|
||||
"Select", self:cfgvalue(section) or self.default, self:choices(), {
|
||||
id = cbid,
|
||||
name = cbid,
|
||||
size = self.size,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%+cbi/valueheader%>
|
||||
<textarea class="cbi-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> data-update="change"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") .. ifattr(self.readonly, "readonly") %>>
|
||||
<%-=pcdata(self:cfgvalue(section))-%>
|
||||
<%-=pcdata(self:cfgvalue(section) or self.default)-%>
|
||||
</textarea>
|
||||
<%+cbi/valuefooter%>
|
||||
|
|
Loading…
Reference in a new issue