<% xhtml %>
<% skin %>
	<% view csrf uses view::csrf %>
	<% template render() %>
		<% if valid %>
			<p>Valid</p>
		<% else %>
			<p>Not Valid</p>
		<% end %>
		<p> Token: <% csrf token %></p>
		<p> Cookie name: <% csrf cookie %></p>
		<h2>Form Forgery</h2>
		<form action="." method="post">
		<% form as_p my_form %>
		</form>
		<h2>Form Post</h2>
		<form action="." method="post"><% csrf %>
		<% form as_p my_form %>
		</form>
		<h2>Form Script</h2>
		<form action="." method="post"><% csrf script %>
		<% form as_p my_form %>
		</form>
	<% end %>
	<% end %>
	<% view hello uses view::hello extends master %>
	<% template body() %>

	<form action="" method="post">
	<ul>
	<% form as_ul form %>
	</ul>
	<input type="submit" value="Submit" />
	</form>
	<form action="" method="post">
	<p>
		<% foreach w as cppcms::form::iterator in form %>
			<% separator %><br/><% item %>
				<% if w.has_message() %><%= w.message() %>:<% end %>
				<% form input w %>
				<% if not w.valid() %>:<%= w.error_message() %><% end %>
			<% end %>
		<% end %>
		<input type="submit" value="Submit" />

	</p>
	<% if rtl %><% end %>
		<% if not empty title %><h1><%= title %></h1><% end %>
		<p><%= msg %></p>
		<% if not empty username %>
		<p> The form was: nik=<%= username %>, name=<%= realname %>, Ok is <% if not ok%>not<% end %> checked,
			password=<%= password %></p>
		<% end %>
		<% foreach x as view::hello::numbers_type::iterator in numbers %>
			<ul>
			<% item %>
			<li><% ngt "passed one day","passed {1} days",x using x %></li>
			<% end %>
			</ul>
		<% end %>
	<% end template %>
	<% end view %>
<% end skin %>

