<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
	function reset(btn,dataname) {
		var s = document.getElementById(dataname + '-status');
		var reset = prompt('<%:Really reset all changes?%><%:Please fill in reset%>',"")
		if (reset == null || reset == "") {
			return false;
		}
		if (reset != "reset") {
			s.innerHTML = "<font style=\'color:red\'><%:The content entered is incorrect!%></font>";
			return false;
		}
		btn.disabled = true;
		btn.value    = '<%:Perform reset%>';
		murl=dataname;
		XHR.get('<%=luci.dispatcher.build_url("admin", "services", "shadowsocksr","reset")%>', { set:murl }, function(x,rv) {
			btn.value    = '<%:Reset complete%>';
			s.innerHTML = "<font style=\'color:green\'><%:Reset complete%></font>";
		});
		return false;
	}
//]]></script>
<input type="button" class="btn cbi-button cbi-button-reset" value="<%:Perform reset%> " onclick="return reset(this,'<%=self.option%>')" />
<span id="<%=self.option%>-status"></span>
<%+cbi/valuefooter%>
