Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
5ed1a09a
Commit
5ed1a09a
authored
Oct 02, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for " Add and Edit "...
parent
e7786abf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
26 deletions
+18
-26
lib/python/OFS/Document.py
lib/python/OFS/Document.py
+6
-3
lib/python/OFS/documentAdd.dtml
lib/python/OFS/documentAdd.dtml
+12
-23
No files found.
lib/python/OFS/Document.py
View file @
5ed1a09a
"""Document object"""
__version__
=
'$Revision: 1.6
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.6
3
$'
[
11
:
-
2
]
from
Globals
import
HTML
,
HTMLFile
,
MessageDialog
from
string
import
join
,
split
,
strip
,
rfind
,
atoi
,
lower
...
...
@@ -248,7 +248,7 @@ the <!--#var title_and_id--> Folder.</P>
manage_addDocumentForm
=
HTMLFile
(
'documentAdd'
,
globals
())
def
manage_addDocument
(
self
,
id
,
title
=
''
,
file
=
''
,
REQUEST
=
None
):
def
manage_addDocument
(
self
,
id
,
title
=
''
,
file
=
''
,
REQUEST
=
None
,
submit
=
None
):
"""
Add a Document object with the contents of file.
...
...
@@ -259,7 +259,10 @@ def manage_addDocument(self,id,title='',file='',REQUEST=None):
i
=
Document
(
file
,
__name__
=
id
)
i
.
title
=
title
self
.
_setObject
(
id
,
i
)
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
)
if
REQUEST
is
not
None
:
u
=
REQUEST
[
'URL1'
]
if
submit
==
" Add and Edit "
:
u
=
"%s/%s"
%
(
u
,
id
)
REQUEST
.
RESPONSE
.
redirect
(
u
+
'/manage_main'
)
return
''
class
DocumentHandler
:
...
...
lib/python/OFS/documentAdd.dtml
View file @
5ed1a09a
...
...
@@ -13,37 +13,26 @@
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Id</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="id" SIZE="40">
</TD>
<TH ALIGN="LEFT" VALIGN="TOP">Id</TH>
<TD ALIGN="LEFT" VALIGN="TOP"><INPUT TYPE="TEXT" NAME="id" SIZE="40"></TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<EM><STRONG>Title</STRONG></EM>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="title" SIZE="40">
</TD>
<TH ALIGN="LEFT" VALIGN="TOP"><EM>Title</EM></TH>
<TD ALIGN="LEFT" VALIGN="TOP"><INPUT TYPE="TEXT" NAME="title" SIZE="40"></TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<EM><STRONG>File</STRONG></EM>
</TD>
<TH ALIGN="LEFT" VALIGN="TOP"><EM><STRONG>File</STRONG></EM></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="file" NAME="file:string" SIZE="25" VALUE="">
</TD>
</TR>
<TR>
<TD></
TD>
<TD
>
<BR><INPUT TYPE="SUBMIT" VALUE=" Add
">
</TD>
<TR>
<TH></TH>
<
TD>
<INPUT TYPE="SUBMIT" VALUE=" Add "
>
<INPUT TYPE="SUBMIT" VALUE=" Add and Edit " NAME="submit
">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
</BODY></HTML>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment