<!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>Editing Fortune</h1>

<%== formTag(urla("save", fortune["id"]), Tf::Post) %>
  <p>
    <label>ID<br /><input type="text" name="fortune[id]" value="<%= fortune["id"] %>" readonly="readonly" /></label>
  </p>
  <p>
    <label>Message<br /><input type="text" name="fortune[message]" value="<%= fortune["message"] %>" /></label>
  </p>
  <p>
    <input type="submit" value="Update" />
  </p>
</form>

<%== linkTo("Show", urla("show", fortune["id"])) %> |
<%== linkTo("Back", urla("index")) %>
</body>
</html>
