Commit 3edb620f authored by Ivan Tyagov's avatar Ivan Tyagov

Remove explicitly converting to boolean. editable_mode is by default int. This...

Remove explicitly converting to boolean. editable_mode is by default int. This prevents from a boolean bad conversion.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23495 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 27ee43e7
......@@ -105,8 +105,10 @@ def getActionTitleForContext(context, portal_type):\n
mapping=dict(portal_type=portal_type))\n
return edit_title\n
\n
editable_mode = int(request.form.get(\'editable_mode\', \n
request.get(\'editable_mode\', 0)))\n
# Append a button to edit the current document\n
if not bool(request.form.get(\'editable_mode\', 0)):\n
if not editable_mode:\n
# The title is called Edit only if the document can be edited\n
if portal_type == \'Web Section\' and context.getDefaultDocumentValue() is not None:\n
# try to show link to default page\n
......@@ -233,7 +235,8 @@ return result\n
<string>getattr</string>
<string>editable_absolute_url</string>
<string>getActionTitleForContext</string>
<string>bool</string>
<string>int</string>
<string>editable_mode</string>
<string>None</string>
<string>default_document</string>
<string>edit_title</string>
......
705
\ No newline at end of file
706
\ 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