Commit 00993db3 authored by Jérome Perrin's avatar Jérome Perrin

Use different message when a template is updated


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42689 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b33b4579
...@@ -62,6 +62,7 @@ if preference is None\\\n ...@@ -62,6 +62,7 @@ if preference is None\\\n
p.enable()\n p.enable()\n
preference = p\n preference = p\n
\n \n
message = context.Base_translateString("Templated created.")\n
\n \n
# if the preference already contains a template with the same name, making\n # if the preference already contains a template with the same name, making\n
# another template will replace it\n # another template will replace it\n
...@@ -70,6 +71,7 @@ for existing_template in preference.contentValues(\n ...@@ -70,6 +71,7 @@ for existing_template in preference.contentValues(\n
portal_type=context.getPortalType()):\n portal_type=context.getPortalType()):\n
if existing_template.getTitle() == document_title:\n if existing_template.getTitle() == document_title:\n
preference.manage_delObjects(ids=[existing_template.getId()])\n preference.manage_delObjects(ids=[existing_template.getId()])\n
message = context.Base_translateString("Templated updated.")\n
break\n break\n
\n \n
parent = context.getParentValue()\n parent = context.getParentValue()\n
...@@ -83,7 +85,7 @@ template.makeTemplate()\n ...@@ -83,7 +85,7 @@ template.makeTemplate()\n
context.portal_caches.clearCacheFactory(\'erp5_ui_medium\')\n context.portal_caches.clearCacheFactory(\'erp5_ui_medium\')\n
\n \n
return context.Base_redirect(form_id,\n return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=context.Base_translateString("Templated made.")),\n keep_items=dict(portal_status_message=message),\n
**kw)\n **kw)\n
</string> </value> </string> </value>
</item> </item>
......
40855 40856
\ No newline at end of file \ No newline at end of file
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