Commit 2e8a446b authored by Jérome Perrin's avatar Jérome Perrin

only display image field if an image has been uploaded, this fixes a broken image

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44797 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9c043a21
......@@ -10,6 +10,9 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>image_format</string>
<string>image_resolution</string>
<string>title</string>
</list>
</value>
......@@ -52,6 +55,12 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -60,10 +69,26 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_format</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -71,6 +96,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_image_field</string> </value>
......@@ -79,6 +108,14 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>image_format</string> </key>
<value> <string>jpg</string> </value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value> <int>75</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -93,4 +130,43 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>context/getDefaultImageAbsoluteUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>preferences/getPreferredImageFormat</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>preferences/getPreferredImageQuality</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -90,7 +90,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Upload</string> </value>
<value> <string>Upload Image</string> </value>
</item>
</dictionary>
</value>
......
......@@ -9,10 +9,7 @@
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>image_format</string>
<string>image_resolution</string>
</list>
<list/>
</value>
</item>
<item>
......@@ -61,18 +58,6 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_format</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
......@@ -92,10 +77,6 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewPDMFieldLibrary</string> </value>
</item>
<item>
<key> <string>image_format</string> </key>
<value> <string>png</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -106,30 +87,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_preferences.getPreferredImageFormat()</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_preferences.getPreferredImageQuality()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
561
\ No newline at end of file
562
\ 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