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
ceab009e
Commit
ceab009e
authored
Dec 21, 2000
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow Add without Edit
parent
51efb515
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
lib/python/Products/PythonScripts/PythonScript.py
lib/python/Products/PythonScripts/PythonScript.py
+8
-4
lib/python/Products/PythonScripts/www/pyScriptAdd.dtml
lib/python/Products/PythonScripts/www/pyScriptAdd.dtml
+1
-0
No files found.
lib/python/Products/PythonScripts/PythonScript.py
View file @
ceab009e
...
@@ -89,7 +89,7 @@ This product provides support for Script objects containing restricted
...
@@ -89,7 +89,7 @@ This product provides support for Script objects containing restricted
Python code.
Python code.
"""
"""
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
import
sys
,
os
,
traceback
,
re
import
sys
,
os
,
traceback
,
re
from
Globals
import
MessageDialog
,
HTMLFile
,
package_home
from
Globals
import
MessageDialog
,
HTMLFile
,
package_home
...
@@ -116,13 +116,17 @@ def manage_addPythonScript(self, id, REQUEST=None):
...
@@ -116,13 +116,17 @@ def manage_addPythonScript(self, id, REQUEST=None):
id
=
str
(
id
)
id
=
str
(
id
)
id
=
self
.
_setObject
(
id
,
PythonScript
(
id
))
id
=
self
.
_setObject
(
id
,
PythonScript
(
id
))
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
file
=
REQUEST
.
form
.
get
(
'file'
,
None
)
file
=
REQUEST
.
form
.
get
(
'file'
,
''
)
if
type
(
file
)
is
not
type
(
''
):
file
=
file
.
read
()
if
file
:
if
file
:
if
type
(
file
)
is
not
type
(
''
):
file
=
file
.
read
()
self
.
_getOb
(
id
).
write
(
file
)
self
.
_getOb
(
id
).
write
(
file
)
try
:
u
=
self
.
DestinationURL
()
try
:
u
=
self
.
DestinationURL
()
except
:
u
=
REQUEST
[
'URL1'
]
except
:
u
=
REQUEST
[
'URL1'
]
REQUEST
.
RESPONSE
.
redirect
(
'%s/%s/manage_main'
%
(
u
,
quote
(
id
)))
if
REQUEST
[
'addedit'
]
==
'Add'
:
goto
=
'%s/manage_workspace'
%
u
else
:
goto
=
'%s/%s/manage_main'
%
(
u
,
quote
(
id
))
REQUEST
.
RESPONSE
.
redirect
(
goto
)
return
''
return
''
...
...
lib/python/Products/PythonScripts/www/pyScriptAdd.dtml
View file @
ceab009e
...
@@ -24,6 +24,7 @@ the script from a local file by typing the file name or using the
...
@@ -24,6 +24,7 @@ the script from a local file by typing the file name or using the
<strong>
File:
</strong>
<input
type=
"file"
name=
"file"
size=
"25"
>
<strong>
File:
</strong>
<input
type=
"file"
name=
"file"
size=
"25"
>
</p>
</p>
<p>
<p>
<input
type=
"submit"
value=
"Add"
name=
"addedit"
>
<input
type=
"submit"
value=
"Add and Edit"
name=
"addedit"
>
<input
type=
"submit"
value=
"Add and Edit"
name=
"addedit"
>
<input
type=
"submit"
value=
"Cancel"
name=
"manage_workspace:method"
>
<input
type=
"submit"
value=
"Cancel"
name=
"manage_workspace:method"
>
</p>
</p>
...
...
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