Skip to content

Commit 1f47c18

Browse files
author
Richard Jones
committed
consistency ... __file/__note -> :file/:note
1 parent 0eb6920 commit 1f47c18

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

roundup/cgi/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.23 2002-09-09 04:43:10 richard Exp $
1+
# $Id: client.py,v 1.24 2002-09-09 23:38:41 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -600,13 +600,13 @@ def editItemAction(self):
600600
:multilink=designator:property
601601
The value specifies a node designator and the property on that
602602
node to add _this_ node to as a link or multilink.
603-
__note
603+
:note
604604
Create a message and attach it to the current node's
605605
"messages" property.
606-
__file
606+
:file
607607
Create a file and attach it to the current node's
608608
"files" property. Attach the file to the message created from
609-
the __note if it's supplied.
609+
the :note if it's supplied.
610610
611611
:required=property,property,...
612612
The named properties are required to be filled in the form.
@@ -645,9 +645,9 @@ def editItemAction(self):
645645
if props:
646646
message = _('%(changes)s edited ok')%{'changes':
647647
', '.join(props.keys())}
648-
elif self.form.has_key('__note') and self.form['__note'].value:
648+
elif self.form.has_key(':note') and self.form[':note'].value:
649649
message = _('note added')
650-
elif (self.form.has_key('__file') and self.form['__file'].filename):
650+
elif (self.form.has_key(':file') and self.form[':file'].filename):
651651
message = _('file added')
652652
else:
653653
message = _('nothing changed')
@@ -969,8 +969,8 @@ def _handle_message(self):
969969
'''
970970
# handle file attachments
971971
files = []
972-
if self.form.has_key('__file'):
973-
file = self.form['__file']
972+
if self.form.has_key(':file'):
973+
file = self.form[':file']
974974
if file.filename:
975975
filename = file.filename.split('\\')[-1]
976976
mime_type = mimetypes.guess_type(filename)[0]
@@ -987,8 +987,8 @@ def _handle_message(self):
987987
note = None
988988
# in a nutshell, don't do anything if there's no note or there's no
989989
# NOSY
990-
if self.form.has_key('__note'):
991-
note = self.form['__note'].value.strip()
990+
if self.form.has_key(':note'):
991+
note = self.form[':note'].value.strip()
992992
if not note:
993993
return None, files
994994
if not props.has_key('messages'):
@@ -1032,7 +1032,7 @@ def _post_editnode(self, nid):
10321032
which issue to link the file to.
10331033
10341034
TODO: I suspect that this and newfile will go away now that
1035-
there's the ability to upload a file using the issue __file form
1035+
there's the ability to upload a file using the issue :file form
10361036
element!
10371037
'''
10381038
cn = self.classname

roundup/templates/classic/html/issue.item

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
<tr>
4545
<th nowrap>Change Note</th>
4646
<td colspan=3>
47-
<textarea name="__note" wrap="hard" rows="5" cols="60"></textarea>
47+
<textarea name=":note" wrap="hard" rows="5" cols="60"></textarea>
4848
</td>
4949
</tr>
5050

5151
<tr>
5252
<th nowrap>File</th>
53-
<td colspan=3><input type="file" name="__file" size="40"></td>
53+
<td colspan=3><input type="file" name=":file" size="40"></td>
5454
</tr>
5555

5656
<tr>

0 commit comments

Comments
 (0)