Commit 6ec41677 authored by Sebastien Robin's avatar Sebastien Robin

* associate PythonScript property sheet to PythonScript class

* fix AttributeError (while searching _v_ft) when runing scripts
* fix title in the form allowing to add erp5 python script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37969 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6615cd9b
......@@ -37,7 +37,7 @@ from Products.PythonScripts.PythonScript import \
# Only needed until skin tool is migrated
manage_addPythonScriptFormThroughZMI = \
HTMLFile("../dtml/addPythonScriptThroughZMI", globals())
HTMLFile("../dtml/addPythonScriptThroughZMIForm", globals())
def addPythonScriptThroughZMI(self, id, title="", REQUEST=None):
"""Add a Python script to a folder.
"""
......@@ -86,6 +86,7 @@ class PythonScript(XMLObject, ZopePythonScript):
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.PythonScript
)
def _setBody(self, value):
......@@ -98,3 +99,7 @@ class PythonScript(XMLObject, ZopePythonScript):
def edit(self, **kw):
XMLObject.edit(self, **kw)
# We need to take __setstate__ from ZopePythonScript in order to
# generate _v_ft attributes which is necessary to run the script
__setstate__ = ZopePythonScript.__setstate__
......@@ -43,4 +43,6 @@ class PythonScript:
'mode' : '' },
)
_categories = ('callable_type',)
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Add ERP5 Formulator Form',
form_title='Add ERP5 Python Script',
)">
<p class="form-help">
Formulator Forms allow you to create solid web forms more easily.
ERP5 Python Scripts allows to add to usual python scripts
some erp5 properties
</p>
<form action="addPythonScriptThroughZMI" method="POST">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment