From bb1465d0d58a66493181662ab686516bf52f9a5c Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 17 Aug 2003 23:54:42 +0000 Subject: [PATCH] add action attribute to issue.item form action tag git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1811 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + roundup/cgi/templating.py | 8 ++++++++ templates/classic/html/issue.item.html | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index b3f669d..f11b98a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ are given with the most recent entry first. - batch the (list) listings at 500 entries per page (sf bug 759906) - don't have RDBMS backends list retired nodes (sf bug 767319) - fix file downloading +- add action attribute to issue.item form tag 2003-07-29 0.6.0b4 diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index dc84826..7a14ffb 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -341,6 +341,10 @@ class HTMLClass(HTMLPermissions): except KeyError: raise AttributeError, attr + def designator(self): + ''' Return this class' designator (classname) ''' + return self._classname + def getItem(self, itemid, num_re=re.compile('\d+')): ''' Get an item of this class by its item id. ''' @@ -544,6 +548,10 @@ class HTMLItem(HTMLPermissions): return self[attr] except KeyError: raise AttributeError, attr + + def designator(self): + ''' Return this item's designator (classname + id) ''' + return '%s%s'%(self._classname, self._nodeid) def submit(self, label="Submit Changes"): ''' Generate a submit button (and action hidden element) diff --git a/templates/classic/html/issue.item.html b/templates/classic/html/issue.item.html index 8db909b..740e9f8 100644 --- a/templates/classic/html/issue.item.html +++ b/templates/classic/html/issue.item.html @@ -20,7 +20,8 @@ You are not allowed to view this page.
+ enctype="multipart/form-data" tal:condition="context/is_edit_ok" + tal:attributes="action string:%{context/_classname}${context/id}"> -- 2.30.2