Skip to content

Commit f6ca0b7

Browse files
author
Richard Jones
committed
add action attribute to issue.item form action tag
1 parent 29d5a48 commit f6ca0b7

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ are given with the most recent entry first.
1111
- batch the (list) listings at 500 entries per page (sf bug 759906)
1212
- don't have RDBMS backends list retired nodes (sf bug 767319)
1313
- fix file downloading
14+
- add action attribute to issue.item form tag
1415

1516

1617
2003-07-29 0.6.0b4

roundup/cgi/templating.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ def __getattr__(self, attr):
341341
except KeyError:
342342
raise AttributeError, attr
343343

344+
def designator(self):
345+
''' Return this class' designator (classname) '''
346+
return self._classname
347+
344348
def getItem(self, itemid, num_re=re.compile('\d+')):
345349
''' Get an item of this class by its item id.
346350
'''
@@ -544,6 +548,10 @@ def __getattr__(self, attr):
544548
return self[attr]
545549
except KeyError:
546550
raise AttributeError, attr
551+
552+
def designator(self):
553+
''' Return this item's designator (classname + id) '''
554+
return '%s%s'%(self._classname, self._nodeid)
547555

548556
def submit(self, label="Submit Changes"):
549557
''' Generate a submit button (and action hidden element)

templates/classic/html/issue.item.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ <h2>
2020
</span>
2121

2222
<form method="POST" name="itemSynopsis" onSubmit="return submit_once()"
23-
enctype="multipart/form-data" tal:condition="context/is_edit_ok">
23+
enctype="multipart/form-data" tal:condition="context/is_edit_ok"
24+
tal:attributes="action string:%{context/_classname}${context/id}">
2425

2526
<input type="hidden" name=":template" value="item">
2627
<input type="hidden" name=":required" value="title,priority">

0 commit comments

Comments
 (0)