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
e92a261c
Commit
e92a261c
authored
Oct 21, 2012
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace
parent
95f9876a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
src/OFS/PropertyManager.py
src/OFS/PropertyManager.py
+6
-7
No files found.
src/OFS/PropertyManager.py
View file @
e92a261c
...
@@ -272,7 +272,6 @@ class PropertyManager(Base, ElementWithAttributes):
...
@@ -272,7 +272,6 @@ class PropertyManager(Base, ElementWithAttributes):
dict
[
p
[
'id'
]]
=
p
dict
[
p
[
'id'
]]
=
p
return
dict
return
dict
# Web interface
# Web interface
security
.
declareProtected
(
manage_properties
,
'manage_addProperty'
)
security
.
declareProtected
(
manage_properties
,
'manage_addProperty'
)
...
@@ -282,7 +281,7 @@ class PropertyManager(Base, ElementWithAttributes):
...
@@ -282,7 +281,7 @@ class PropertyManager(Base, ElementWithAttributes):
Sets a new property with the given id, type, and value.
Sets a new property with the given id, type, and value.
"""
"""
if
type
in
type_converters
:
if
type
in
type_converters
:
value
=
type_converters
[
type
](
value
)
value
=
type_converters
[
type
](
value
)
self
.
_setProperty
(
id
.
strip
(),
value
,
type
)
self
.
_setProperty
(
id
.
strip
(),
value
,
type
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_propertiesForm
(
self
,
REQUEST
)
return
self
.
manage_propertiesForm
(
self
,
REQUEST
)
...
@@ -297,16 +296,16 @@ class PropertyManager(Base, ElementWithAttributes):
...
@@ -297,16 +296,16 @@ class PropertyManager(Base, ElementWithAttributes):
instead for most situations.
instead for most situations.
"""
"""
for
prop
in
self
.
_propertyMap
():
for
prop
in
self
.
_propertyMap
():
name
=
prop
[
'id'
]
name
=
prop
[
'id'
]
if
'w'
in
prop
.
get
(
'mode'
,
'wd'
):
if
'w'
in
prop
.
get
(
'mode'
,
'wd'
):
if
prop
[
'type'
]
==
'multiple selection'
:
if
prop
[
'type'
]
==
'multiple selection'
:
value
=
REQUEST
.
get
(
name
,
[])
value
=
REQUEST
.
get
(
name
,
[])
else
:
else
:
value
=
REQUEST
.
get
(
name
,
''
)
value
=
REQUEST
.
get
(
name
,
''
)
self
.
_updateProperty
(
name
,
value
)
self
.
_updateProperty
(
name
,
value
)
if
REQUEST
:
if
REQUEST
:
message
=
"Saved changes."
message
=
"Saved changes."
return
self
.
manage_propertiesForm
(
self
,
REQUEST
,
return
self
.
manage_propertiesForm
(
self
,
REQUEST
,
manage_tabs_message
=
message
)
manage_tabs_message
=
message
)
security
.
declareProtected
(
manage_properties
,
'manage_changeProperties'
)
security
.
declareProtected
(
manage_properties
,
'manage_changeProperties'
)
...
...
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