]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/edit
Here are the templates!
[maypole.git] / templates / factory / edit
diff --git a/templates/factory/edit b/templates/factory/edit
new file mode 100644 (file)
index 0000000..11a2539
--- /dev/null
@@ -0,0 +1,21 @@
+[% PROCESS list_macros %]
+[% INCLUDE header %]
+
+[% FOR item = objects; %]
+<h2> Edit [% item.name %]</h2>
+
+<FORM ACTION="[% base %]/[% classmetadata.moniker %]/do_edit/[% item.id %]" METHOD="post">
+[%
+     FOR col = classmetadata.columns;
+        NEXT IF col == "id";
+        "<P>";
+        "<B>"; classmetadata.colnames.$col; "</B>";
+        ": ";
+            item.to_field(col).as_HTML;
+        "</P>";
+        IF errors.$col; 
+            "<FONT COLOR=\"#ff0000\">"; errors.$col; "</FONT>";
+        END;
+    END;
+     '<INPUT TYPE="submit" NAME="edit" VALUE="edit">';
+END %]