summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/luasrc/view/dockerman/cbi
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-dockerman/luasrc/view/dockerman/cbi')
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm7
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm33
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/cbi/namedsection.htm9
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/cbi/xfvalue.htm10
4 files changed, 59 insertions, 0 deletions
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm
new file mode 100644
index 0000000000..b1b1932571
--- /dev/null
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm
@@ -0,0 +1,7 @@
+<div style="display: inline-block;">
+ <% if self:cfgvalue(section) ~= false then %>
+ <input class="cbi-button cbi-button-<%=self.inputstyle or "button" %>" type="submit"" <% if self.disable then %>disabled <% end %><%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.inputtitle or self.title)%> />
+ <% else %>
+ -
+ <% end %>
+</div>
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm
new file mode 100644
index 0000000000..51c97f5c97
--- /dev/null
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm
@@ -0,0 +1,33 @@
+<div style="display: inline-block;">
+ <!-- <%- if self.title then -%>
+ <label class="cbi-value-title"<%= attr("for", cbid) %>>
+ <%- if self.titleref then -%><a title="<%=self.titledesc or translate('Go to relevant configuration page')%>" class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%>
+ <%-=self.title-%>
+ <%- if self.titleref then -%></a><%- end -%>
+ </label>
+ <%- end -%> -->
+ <%- if self.password then -%>
+ <input type="password" style="position:absolute; left:-100000px" aria-hidden="true"<%=
+ attr("name", "password." .. cbid)
+ %> />
+ <%- end -%>
+ <input data-update="change"<%=
+ attr("id", cbid) ..
+ attr("name", cbid) ..
+ attr("type", self.password and "password" or "text") ..
+ attr("class", self.password and "cbi-input-password" or "cbi-input-text") ..
+ attr("value", self:cfgvalue(section) or self.default) ..
+ ifattr(self.password, "autocomplete", "new-password") ..
+ ifattr(self.size, "size") ..
+ ifattr(self.placeholder, "placeholder") ..
+ ifattr(self.readonly, "readonly") ..
+ ifattr(self.maxlength, "maxlength") ..
+ ifattr(self.datatype, "data-type", self.datatype) ..
+ ifattr(self.datatype, "data-optional", self.optional or self.rmempty) ..
+ ifattr(self.combobox_manual, "data-manual", self.combobox_manual) ..
+ ifattr(#self.keylist > 0, "data-choices", { self.keylist, self.vallist })
+ %> />
+ <%- if self.password then -%>
+ <div class="cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'">∗</div>
+ <% end %>
+</div>
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/namedsection.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/namedsection.htm
new file mode 100644
index 0000000000..244d2c10ad
--- /dev/null
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/namedsection.htm
@@ -0,0 +1,9 @@
+<% if self:cfgvalue(self.section) then section = self.section %>
+ <div class="cbi-section" id="cbi-<%=self.config%>-<%=section%>">
+ <%+cbi/tabmenu%>
+ <div class="cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id="cbi-<%=self.config%>-<%=section%>">
+ <%+cbi/ucisection%>
+ </div>
+ </div>
+<% end %>
+<!-- /nsection -->
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/xfvalue.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/xfvalue.htm
new file mode 100644
index 0000000000..04f7bc2ee8
--- /dev/null
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/xfvalue.htm
@@ -0,0 +1,10 @@
+<%+cbi/valueheader%>
+ <input type="hidden" value="1"<%=
+ attr("name", "cbi.cbe." .. self.config .. "." .. section .. "." .. self.option)
+ %> />
+ <input class="cbi-input-checkbox" data-update="click change" type="checkbox" <% if self.disable == 1 then %>disabled <% end %><%=
+ attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) ..
+ ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked")
+ %> />
+ <label<%= attr("for", cbid)%>></label>
+<%+cbi/valuefooter%>