Commit d6ef24d3 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Make the API of addAction consistent with CMF.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39270 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99925d22
...@@ -60,7 +60,7 @@ def ActionProviderBase_manage_editActionsForm( self, REQUEST, manage_tabs_messag ...@@ -60,7 +60,7 @@ def ActionProviderBase_manage_editActionsForm( self, REQUEST, manage_tabs_messag
def ActionProviderBase_addAction( self def ActionProviderBase_addAction( self
, id , id
, title , name
, action , action
, condition , condition
, permission , permission
...@@ -73,8 +73,8 @@ def ActionProviderBase_addAction( self ...@@ -73,8 +73,8 @@ def ActionProviderBase_addAction( self
): ):
""" Add an action to our list. """ Add an action to our list.
""" """
if not title: if not name:
raise ValueError('A title is required.') raise ValueError('A name is required.')
a_expr = action and Expression(text=str(action)) or '' a_expr = action and Expression(text=str(action)) or ''
i_expr = icon and Expression(text=str(icon)) or '' i_expr = icon and Expression(text=str(icon)) or ''
...@@ -86,7 +86,7 @@ def ActionProviderBase_addAction( self ...@@ -86,7 +86,7 @@ def ActionProviderBase_addAction( self
new_actions = self._cloneActions() new_actions = self._cloneActions()
new_action = ActionInformation( id=str(id) new_action = ActionInformation( id=str(id)
, title=str(title) , title=str(name)
, description=str(description) , description=str(description)
, action=a_expr , action=a_expr
, icon=i_expr , icon=i_expr
......
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