Commit 092a1ccd authored by Aurel's avatar Aurel

take message class into account for display of workflow history


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6088 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 10c7eeb2
...@@ -102,6 +102,15 @@ for workflow_item in workflow_item_list:\n ...@@ -102,6 +102,15 @@ for workflow_item in workflow_item_list:\n
if value == "\'edit\'":\n if value == "\'edit\'":\n
value = "edit"\n value = "edit"\n
value = wf_transitions[value].title or wf_transitions[value].actbox_name or value\n value = wf_transitions[value].title or wf_transitions[value].actbox_name or value\n
if key == \'error_message\' and not same_type(value, \'\'):\n
# use of Message class\n
value = \'%s\' %value \n
elif key == \'error_message\' and same_type(value, \'\'):\n
# old message way\n
value = context.Localizer.erp5_ui.gettext(value)\n
if same_type(value, \'\') and key != \'error_message\':\n
value = context.Localizer.erp5_ui.gettext(value)\n
\n
if same_type(value, \'\'):\n if same_type(value, \'\'):\n
value = context.Localizer.erp5_ui.gettext(value)\n value = context.Localizer.erp5_ui.gettext(value)\n
o.setProperty(key, value)\n o.setProperty(key, value)\n
......
...@@ -113,7 +113,9 @@ except FormValidationError, validation_errors:\n ...@@ -113,7 +113,9 @@ except FormValidationError, validation_errors:\n
return form(request)\n return form(request)\n
\n \n
except ValidationFailed, error_message:\n except ValidationFailed, error_message:\n
# I hope the error_message is already translated (if we need to use mapping)\n if hasattr(error_message, \'msg\'):\n
# use of Message class to store message+mapping+domain\n
error_message = error_message.msg\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
, \'portal_status_message=%s\' % error_message\n , \'portal_status_message=%s\' % error_message\n
)\n )\n
...@@ -193,6 +195,7 @@ context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n ...@@ -193,6 +195,7 @@ context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>validation_errors</string> <string>validation_errors</string>
<string>field_errors</string> <string>field_errors</string>
<string>error_message</string> <string>error_message</string>
<string>hasattr</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
2006-02-07 Kevin 2006-03-13 Aurel
* modify Base_getWorkflowHistoryItemList and Workflow_statusModify in order to take Message class into account
2006-03-09 Seb
* Added try/except in Base_translateString
2006-03-08 Kevin
* Allow Accounting Transaction and similar as subobjects of Preference but hide them (feature needed for jp's template system).
* Replace getPreferredDateInputOrder() calls by getPreferredDateOrder()
* Call Base_translateString() instead of Base_TranslateString()
2006-03-08 JPS
* Make sure group membership is acquired through careers and subordination
* Make sure role is acquired from Career
2006-03-07 Kevin
* Fix mass workflow status modification (Folder_modifyWorkflowStatus and Base_callViewDialogMethod updated). * Fix mass workflow status modification (Folder_modifyWorkflowStatus and Base_callViewDialogMethod updated).
2006-03-06 romain 2006-03-06 romain
......
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