small-package/luci-app-alist/luasrc/view/alist/admin_info.htm

26 lines
828 B
HTML

<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
function admin_info(btn)
{
btn.disabled = true;
btn.value = '<%:Reading...%>';
XHR.get('<%=luci.dispatcher.build_url("admin", "nas", "alist", "admin_info")%>',
null,
function(x,rv)
{
var tb = document.getElementById('<%=self.option%>-status');
if (tb)
{
tb.innerHTML = "<%:Username:%>" + "<font color='green'>" + rv.username + "</font>";
tb.innerHTML += "<%:Password:%>" + "<font color='green'>" + rv.password + "</font>";
}
btn.disabled = false;
btn.value = '<%:Read%>';
}
);
return false;
}
//]]></script>
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Read%>" onclick="return admin_info(this)" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
<%+cbi/valuefooter%>