luci-app-aria2: Refactor, new views and more options
[project/luci.git] / applications / luci-app-aria2 / luasrc / view / aria2 / value_with_btn.htm
1 <%#
2 Copyright 2017-2019 Xingwang Liao <kuoruan@gmail.com>
3 Licensed to the public under the MIT License.
4 -%>
5
6 <%+cbi/valueheader%>
7 <input data-update="change" type="text" class="cbi-input-text"<%=
8 attr("id", cbid) ..
9 attr("name", cbid) ..
10 attr("value", self:cfgvalue(section) or self.default) ..
11 ifattr(self.size, "size") ..
12 ifattr(self.placeholder, "placeholder") ..
13 ifattr(self.maxlength, "maxlength") ..
14 ifattr(self.datatype, "data-type", self.datatype) ..
15 ifattr(self.onmouseover, "onmouseover")
16 %> />
17 <%- if self.btntext then -%>
18 <div class="cbi-button cbi-button-neutral" title="<%=self.btntext%>" aria-label="<%=self.btntext%>"<%=
19 ifattr(self.btnclick, "onclick", self.btnclick)
20 %>><span style="font-weight: normal;"><%=self.btntext%></span></div>
21 <% end %>
22 <%+cbi/valuefooter%>