[Zope-CVS] CVS: Packages/JobBoardEx - JobPreviewView.pt:1.7 JobCreateView.pt:1.4 JobCreateView.py:1.3 JobList.zcml:1.23
Guido van Rossum
guido@python.org
Mon, 17 Jun 2002 11:30:18 -0400
Update of /cvs-repository/Packages/JobBoardEx
In directory cvs.zope.org:/tmp/cvs-serv5760
Modified Files:
JobCreateView.pt JobCreateView.py JobList.zcml
Added Files:
JobPreviewView.pt
Log Message:
Add a simple job preview feature.
=== Packages/JobBoardEx/JobPreviewView.pt 1.6 => 1.7 ===
+<head>
+<title>Preview new job data</title>
+</head>
+
+<body>
+
+<h1>Preview New Job Data</h1>
+
+<p>This is what your job would look like. To change, use your
+browser's Back button. To submit, click on the Submit button below.
+
+<hr>
+ <h3>Job 123</h3>
+
+ <table border=0>
+ <tr><td>Summary:</td>
+ <td tal:content="request/summary">The best job on the net</td>
+ </tr>
+ </table>
+<hr>
+
+ <form action="create" method="post">
+ <input name="summary" type="hidden" value=""
+ tal:attributes="value request/summary|default" />
+ <input type="submit" value="Submit" />
+ </form>
+
+</body>
+</html>
=== Packages/JobBoardEx/JobCreateView.pt 1.3 => 1.4 ===
<body>
<h1>Enter new job data</h1>
- <form action="create" method="post">
+
+<p>When you are done, press the Preview button below.</p>
+
+ <form action="previewForm.html" method="post">
<table border=0>
<tr><td>Summary:</td>
<td><input name="summary" type="text" value="" size="72"
@@ -13,7 +16,7 @@
</td>
</tr>
<tr><td colspan="2">
- <input type="submit" value="Create">
+ <input type="submit" value="Preview">
</td>
</tr>
</table>
=== Packages/JobBoardEx/JobCreateView.py 1.2 => 1.3 ===
form = ViewPageTemplateFile('JobCreateView.pt')
+ form2 = ViewPageTemplateFile('JobPreviewView.pt')
+
def action(self, summary):
job = Job('', summary, '', '')
self.context.add(job)
self.request.getResponse().redirect('.')
-
=== Packages/JobBoardEx/JobList.zcml 1.22 => 1.23 ===
>
- <browser:page name="createForm.html" attribute="form" />
- <browser:page name="create" attribute="action" />
+ <browser:page name="createForm.html" attribute="form" />
+ <browser:page name="previewForm.html" attribute="form2" />
+ <browser:page name="create" attribute="action" />
</browser:view>