
<!-- ++ BEGIN ++ Dynamic DNS ++ global_value.htm ++ -->
<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
	// event handler on changed date
	function onkeyup_date(value) {
		var obj = document.getElementById("cbid.ddns.global.ddns_dateformat.help");
		if ( !obj ) { return; }	// security check

		if ( value == "" || value.length == 0 ) { value = "%F %R"; }
		var now = new Date();
		var txt = now.toLocaleFormat(value);
		// handle newline(%n) and tab(%t) needs to be converted to HTML
		txt = txt.replace(new RegExp('\r?\n','g'), '<br />');
		txt = txt.replace(new RegExp('\t','g'), '&nbsp;&nbsp;&nbsp;&nbsp;');
		obj.innerHTML = "<%:Current setting%>: <strong>" + txt + "<\/strong>";
	}
//]]></script>

<input type="text" class="cbi-input-text" onchange="cbi_d_update(this.id)" onkeyup="onkeyup_date(this.value)"
	<%=
	attr("name", cbid) .. attr("id", cbid) .. attr("value", self:cfgvalue(section) or self.default) ..
	ifattr(self.size, "size") .. ifattr(self.placeholder, "placeholder")
	%>
/>
<br />
<div class="cbi-value-description">
	<span class="cbi-value-helpicon"><img src="<%=resource%>/cbi/help.gif" alt="<%:help%>" /></span><%=self.description%>
	<br /><%:Current setting%>: <strong><%=self.date_string%></strong>
</div>	<!-- div class="cbi-value-description" -->
</div>	<!-- div class="cbi-value-field" -->
</div>	<!-- div class="cbi-value cbi-value-last" -->
<!-- ++ END ++ Dynamic DNS ++ global_value.htm ++ -->
