changeset c560c85b1cb3 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=c560c85b1cb3
description:
        Define as option the type attribute of image

        issue10140
diffstat:

 trytond/ir/ui/form.rnc |   2 +-
 trytond/ir/ui/form.rng |  16 +++++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (38 lines):

diff -r 8f3cb498a49e -r c560c85b1cb3 trytond/ir/ui/form.rnc
--- a/trytond/ir/ui/form.rnc    Sat Mar 20 12:38:16 2021 +0100
+++ b/trytond/ir/ui/form.rnc    Sat Mar 20 12:50:28 2021 +0100
@@ -111,7 +111,7 @@
 attlist.field &= attribute symbol { text }?
 image = element image { attlist.image, empty }
 attlist.image &= attribute name { text }
-attlist.image &= [a:defaultValue = "icon"] attribute type { "icon" | "url" }
+attlist.image &= [a:defaultValue = "icon"] attribute type { "icon" | "url" }?
 attlist.affix &= attribute url_size { text }?
 attlist.image &= [ a:defaultValue = "1" ] attribute colspan { text }?
 attlist.image &=
diff -r 8f3cb498a49e -r c560c85b1cb3 trytond/ir/ui/form.rng
--- a/trytond/ir/ui/form.rng    Sat Mar 20 12:38:16 2021 +0100
+++ b/trytond/ir/ui/form.rng    Sat Mar 20 12:50:28 2021 +0100
@@ -506,13 +506,15 @@
     </attribute>
   </define>
   <define name="attlist.image" combine="interleave">
-    <attribute a:defaultValue="icon">
-      <name ns="">type</name>
-      <choice>
-        <value>icon</value>
-        <value>url</value>
-      </choice>
-    </attribute>
+    <optional>
+      <attribute a:defaultValue="icon">
+        <name ns="">type</name>
+        <choice>
+          <value>icon</value>
+          <value>url</value>
+        </choice>
+      </attribute>
+    </optional>
   </define>
   <define name="attlist.affix" combine="interleave">
     <optional>

Reply via email to