[Zope-PTK] Debugging PTK II
Fabio Forno
sciasbat@inorbit.com
Mon, 14 Aug 2000 22:25:37 +0200
Some more bugs and corrections:
Problem: it wasn't possible to change the effetive_date and the comment
of a portal content status
Fixes:
I've changed the content_status_modify method of the Portal ZClass in
this way, so that the comment and the effetive_date input names don't
conflict with the corresponding attributes (for some reason I don't
understand yet, with the same name they were set always to None):
<dtml-let oldloc="this().absolute_url()"
newloc="portal_workflow.changeStateFor(this(),
transition, comment_, effective_date=effective_date_).absolute_url()">
<dtml-if expr="oldloc != newloc">
<dtml-call expr="RESPONSE.redirect(newloc)">
<dtml-else>
<dtml-return expr="content_status_form(_.None, _)">
</dtml-if>
</dtml-let>
Therefore I've changed also input names in the content_status_form to
"comment_" and "effective_date_"
I've also added a dtml-var to diplay the current comment value into
the text area:
<textarea name="comment_" cols="60" rows="5" wrap="soft"
style="width: 100%"><dtml-if comment><dtml-var
comment></dtml-if></textarea>
More over the comment attribute wasn't declared in the PortalContent
class and I've added it
ByE,
FF