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
81ecb603
Commit
81ecb603
authored
Jan 07, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to PropMgr
parent
98de4e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
112 deletions
+130
-112
lib/python/OFS/PropertyManager.py
lib/python/OFS/PropertyManager.py
+3
-2
lib/python/OFS/properties.dtml
lib/python/OFS/properties.dtml
+127
-110
No files found.
lib/python/OFS/PropertyManager.py
View file @
81ecb603
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Property management"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
...
...
@@ -100,10 +100,11 @@ __version__='$Revision: 1.1 $'[11:-2]
## import Globals
from
ZPublisher.Converters
import
type_converters
from
Globals
import
HTMLFile
,
MessageDialog
from
string
import
find
,
join
,
lower
,
split
from
DocumentTemplate
import
html_quote
from
DateTime
import
DateTime
from
Globals
import
HTMLFile
def
aq_base
(
ob
):
...
...
lib/python/OFS/properties.dtml
View file @
81ecb603
<
HTML
>
<
HEAD
>
<
TITLE>Properties</TITLE
>
</
HEAD
>
<
BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK
="#555555">
<
html
>
<
head
>
<
title>
Properties
</title
>
</
head
>
<
body
bgcolor=
"#FFFFFF"
link=
"#000099"
vlink
=
"#555555"
>
<!--#var manage_tabs-->
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<P>
<p>
<em>
You are currently working in session
<!--#var Principia-Session-->
</em>
</p>
<!--#/if Principia-Session-->
<
FORM ACTION="<!--#var URL1-->/manage_editProperties
">
<
form
action=
"."
method=
"POST
"
>
<!--#if propertyMap-->
The following properties are defined for this item.
To change a property's value, edit the value and click "Change".
<P>
<TABLE CELLPADDING="4">
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>id</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<!--#var id-->
</TD>
</TR>
<!--#if propertyInputs-->
<!--#in propertyInputs mapping-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG><!--#var id--></STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<!--#var input-->
</TD>
</TR>
<!--#/in propertyInputs-->
<!--#/if propertyInputs-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="SUBMIT" VALUE="Change">
</TD>
</TR>
</TABLE>
</FORM>
<!--#else propertyMap-->
<EM>No properties have been defined for
<STRONG><!--#var title_or_id--></STRONG></EM>
<!--#/if propertyMap-->
<p>
The following properties are defined for this item. To
<a
href=
"#addpropform"
>
add a new property
</a>
, enter a name, type and value for the new property
and click the
"
Add
"
button. To change property values, edit the
values and click "Save Changes".
</p>
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"2"
>
<!--#in propertyMap mapping-->
<tr>
<td
align=
"left"
valign=
"top"
width=
"16"
>
<!--#if "'d' in _['sequence-item'].get('mode', 'awd')"-->
<input
type=
"checkbox"
name=
"ids:list"
value=
"<!--#var id-->"
>
<!--#else-->
<!--#endif-->
</td>
<td
align=
"left"
valign=
"top"
>
<strong>
<!--#var id-->
</strong>
</td>
<td
align=
"left"
valign=
"top"
>
<!--#if "'w' in _['sequence-item'].get('mode', 'awd')"-->
<!--#if "type in ('string', 'int', 'long', 'float', 'date')"-->
<input
type=
"text"
name=
"<!--#var id-->:<!--#var type-->"
size=
"35"
value=
"<!--#var "
_
[
id
]"
--
>
">
<!--#elif "type=='tokens'"-->
<input
type=
"text"
name=
"<!--#var id-->:tokens"
size=
"35"
value=
"<!--#in "
_
[
id
]"
--
>
<!--#var sequence-item-->
<!--#endin-->
">
<!--#elif "type=='text'"-->
<textarea
name=
"<!--#var id-->:text"
rows=
"6"
cols=
"35"
>
<!--#var
"_[id]"-->
</textarea>
<!--#elif "type=='lines'"-->
<textarea
name=
"<!--#var id-->:lines"
rows=
"6"
cols=
"35"
>
<!--#in
"_[id]"--><!--#var sequence-item-->
<!--#endin-->
</textarea>
<!--#else-->
<em>
Unknown property type
</em>
<!--#endif-->
<!--#else-->
<table
border=
"1"
>
<tr><td>
<!--#var "_[id]"-->
</td></tr>
</table>
<!--#endif-->
</td>
</tr>
<!--#endin-->
<tr>
<td
align=
"left"
valign=
"top"
width=
"16"
>
</td>
<td
align=
"left"
valign=
"top"
width=
"16"
>
</td>
<td
align=
"left"
valign=
"top"
>
<input
type=
"submit"
name=
"manage_editProperties:method"
value=
"Save Changes"
>
<input
type=
"submit"
name=
"manage_delProperties:method"
value=
"Delete"
>
</td>
</tr>
</table>
<P>
<HR>
<FORM ACTION="<!--#var URL1-->/manage_addProperty" METHOD="POST">
To add a property, enter the id, type, and initial value of the new
property below and click "Add".
<BR>
<TABLE>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Id</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="id" SIZE="16">
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Type</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="type">
<!--#else-->
<p>
There are currently no properties defined for this item.
To add a property, click the
"
Add...
"
button.
</p>
<!--#endif-->
</form>
<hr>
<a
name=
"addpropform"
>
<form
action=
"<!--#var URL1-->/manage_addProperty"
method=
"POST"
>
<p>
To add a new property, enter a name, type and value for the new
property and click the
"
Add
"
button.
</p>
<table>
<tr>
<td
align=
"left"
valign=
"top"
>
<strong>
Id
</strong>
</td>
<td
align=
"left"
valign=
"top"
>
<input
type=
"text"
name=
"id"
size=
"20"
>
</td>
</tr>
<tr>
<td
align=
"left"
valign=
"top"
>
<strong>
Type
</strong>
</td>
<td
align=
"left"
valign=
"top"
>
<select
name=
"type"
>
<!--#in propertyTypes mapping-->
<
OPTION
<!--#var selected-->><!--#var id-->
<
option
<!
--#var
selected--
>
>
<!--#var id-->
<!--#/in propertyTypes-->
</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Value</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="value" SIZE="40">
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP"></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="SUBMIT" VALUE=" Add ">
</TD>
</TR>
</TABLE>
</FORM>
</select>
</td>
</tr>
<tr>
<td
align=
"left"
valign=
"top"
>
<strong>
Value
</strong>
</td>
<td
align=
"left"
valign=
"top"
>
<input
type=
"text"
name=
"value"
size=
"20"
>
</td>
</tr>
<tr>
<td
align=
"left"
valign=
"top"
>
</td>
<td
align=
"left"
valign=
"top"
>
<input
type=
"submit"
value=
" Add "
>
</td>
</tr>
</table>
</form>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<!--#if propertyMap_d-->
<P>
<HR>
<FORM ACTION="<!--#var URL1-->/manage_delProperties" METHOD="POST">
To delete properties, select one or more property ids
from the list below and click "Delete".
<BR>
<TABLE>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="ids:list" SIZE="5" MULTIPLE>
<!--#in propertyMap_d mapping-->
<OPTION VALUE="<!--#var id-->"><!--#var id-->
<!--#/in propertyMap_d-->
</SELECT>
<BR>
<INPUT TYPE="SUBMIT" VALUE="Delete">
</TD>
</TR>
</TABLE>
</FORM>
<!--#/if propertyMap_d-->
</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