<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
	function check_port(btn)
	{
		btn.disabled = true;
		btn.value    = '<%:Check...%>';
		XHR.get('<%=luci.dispatcher.build_url("admin", "services", "shadowsocksr","checkport")%>',
			null,
			function(x,rv)
			{
			var s = document.getElementById('<%=self.option%>-status');
			if (s)
			{
				s.innerHTML =rv.ret;
			}
				btn.disabled = false;
				btn.value    = '<%:Check Server%>';
			}
		);
		return false;
	}
//]]></script>
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Check Server%>" onclick="return check_port(this)" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
<%+cbi/valuefooter%>
