Commit 52a09871 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix check type selection field being kept as editable after initial page...

Fix check type selection field being kept as editable after initial page "refresh" which can lead to user confusion.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14581 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent daf8f75a
...@@ -71,8 +71,6 @@ from Products.ERP5Type.Message import Message\n ...@@ -71,8 +71,6 @@ from Products.ERP5Type.Message import Message\n
from Products.ERP5Type.Document import newTempBase\n from Products.ERP5Type.Document import newTempBase\n
\n \n
request = context.REQUEST\n request = context.REQUEST\n
resource = request.get(\'resource\',None)\n
previous_resource = request.get(\'previous_resource\',None)\n
item_model = context.getPortalObject().restrictedTraverse(resource)\n item_model = context.getPortalObject().restrictedTraverse(resource)\n
\n \n
# We must make sure that the selection is not None\n # We must make sure that the selection is not None\n
...@@ -228,7 +226,7 @@ else:\n ...@@ -228,7 +226,7 @@ else:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>listbox=None,batch_mode=0,**kw</string> </value> <value> <string>listbox=None,batch_mode=0,resource=None,previous_resource=None,**kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -248,7 +246,7 @@ else:\n ...@@ -248,7 +246,7 @@ else:\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>2</int> </value> <value> <int>4</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -256,6 +254,8 @@ else:\n ...@@ -256,6 +254,8 @@ else:\n
<tuple> <tuple>
<string>listbox</string> <string>listbox</string>
<string>batch_mode</string> <string>batch_mode</string>
<string>resource</string>
<string>previous_resource</string>
<string>kw</string> <string>kw</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
...@@ -264,13 +264,11 @@ else:\n ...@@ -264,13 +264,11 @@ else:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>None</string>
<string>resource</string>
<string>previous_resource</string>
<string>item_model</string> <string>item_model</string>
<string>Products.ERP5Form.Selection</string> <string>Products.ERP5Form.Selection</string>
<string>Selection</string> <string>Selection</string>
<string>selection</string> <string>selection</string>
<string>None</string>
<string>error_value</string> <string>error_value</string>
<string>field_error_dict</string> <string>field_error_dict</string>
<string>generate_error</string> <string>generate_error</string>
...@@ -318,6 +316,8 @@ else:\n ...@@ -318,6 +316,8 @@ else:\n
<tuple> <tuple>
<none/> <none/>
<int>0</int> <int>0</int>
<none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
<value> <value>
<list> <list>
<string>my_resource</string> <string>my_resource</string>
<string>your_resource</string>
<string>my_previous_resource</string> <string>my_previous_resource</string>
</list> </list>
</value> </value>
......
...@@ -273,15 +273,18 @@ ...@@ -273,15 +273,18 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <tuple>
<tuple/> <string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: request.get(\'resource\', \'dummy\')</string> </value> <value> <string>python: here.getProperty(\'previous_resource\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -289,8 +292,11 @@ ...@@ -289,8 +292,11 @@
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <tuple>
<tuple/> <string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -137,9 +137,7 @@ ...@@ -137,9 +137,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -163,7 +161,9 @@ ...@@ -163,7 +161,9 @@
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
...@@ -181,7 +181,9 @@ ...@@ -181,7 +181,9 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -301,7 +303,7 @@ ...@@ -301,7 +303,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: not request.get(\'previous_resource\', False)</string> </value> <value> <string>python: request.get(\'resource\', False)</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -322,4 +324,20 @@ ...@@ -322,4 +324,20 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: ((request.get(\'resource\', False)) and (None, ) or (\'Type\', ))[0]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
248 252
\ 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