<!DOCTYPE HTML>
<%#include "fortune.h" %>
<% tfetch(QVariantMap, fortune); %>
<html>
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= controller()->name() + ": " + controller()->activeAction() %></title>
</head>
<body>
<p style="color: red"><%=$ error %></p>
<p style="color: green"><%=$ notice %></p>

<h1>New Fortune</h1>

<%== formTag(urla("create"), Tf::Post) %>
  <p>
    <label>Message<br /><input name="fortune[message]" value="<%= fortune["message"] %>" /></label>
  </p>
  <p>
    <input type="submit" value="Create" />
  </p>
</form>

<%== linkTo("Back", urla("index")) %>

</body>
</html>
