luci-compat: disable legacy cbi forms on insufficient ACLs
[oweals/luci.git] / modules / luci-compat / luasrc / view / cbi / header.htm
1 <%+header%>
2
3 <% local has_writeable_map = false %>
4
5 <form method="post" name="cbi" action="<%=REQUEST_URI%>" enctype="multipart/form-data" onreset="return cbi_validate_reset(this)" onsubmit="return cbi_validate_form(this, '<%:Some fields are invalid, cannot save values!%>')"<%=
6         attr("data-strings", luci.util.serialize_json({
7                 label = {
8                         choose = translate('-- Please choose --'),
9                         custom = translate('-- custom --'),
10                 },
11                 path = {
12                         resource = resource,
13                         browser  = url("admin/filebrowser")
14                 }
15         }))
16 %>>
17         <div>
18                 <input type="hidden" name="token" value="<%=token%>" />
19                 <input type="hidden" name="cbi.submit" value="1" />
20                 <input type="submit" value="<%:Save%>" class="hidden" />
21         </div>