summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/scripts/wicketHtml5Patch.js
blob: 49088e1315af1b215e000e72c9f56294961136d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//This provides a basic patch/hack to allow Wicket 1.4 to support HTML5 input types

Wicket.Form.serializeInput_original = Wicket.Form.serializeInput;

Wicket.Form.serializeInput = function(input)
{
	if (input.type.toLowerCase() == "date")
	{
		return Wicket.Form.encode(input.name) + "=" + Wicket.Form.encode(input.value) + "&";
	}
	
	return Wicket.Form.serializeInput_original(input);
}