<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
	function cache(btn,urlname)
	{
		btn.disabled = true;
		btn.value    = '<%:Perform reset%>';
		murl=urlname;
		XHR.get('<%=luci.dispatcher.build_url("admin", "services", "shadowsocksr","cache")%>',
			{ set:murl },
			function(x,rv)
			{
			var s = document.getElementById(urlname+'-status');
			if (s)
			{
				if (rv.ret=="0")
				s.innerHTML ="<font color='green'>"+"<%:Reset complete%>"+"</font>";
				else
				s.innerHTML ="<font color='red'>"+"<%:Reset Error%>"+"</font>";
			}
				btn.disabled = false;
				btn.value    = '<%:Perform reset%>';
			}
		);
		return false;
	}
//]]></script>
<input type="button" class="btn cbi-button cbi-button-reset" value="<%:Perform reset%>" onclick="return cache(this,'<%=self.option%>')" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
<%+cbi/valuefooter%>
