Changes for page homeopathsSheet

Last modified by Jip-jan Alunkel on March 26, 17:31

From version 1.35
edited by Jip-jan Alunkel
on March 07, 23:15
Change comment: There is no comment for this version
To version 1.31
edited by Jip-jan Alunkel
on March 07, 22:27
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -32,16 +32,16 @@
32 32  <div id="${spaceTitle}" class="box sheet_properties">
33 33   <h2>Details</h2>
34 34  #set($classProperties = {
35 - 'practiceName': {'type': 'string', 'opener': 0},
36 - 'pmStreet': {'type': 'string', 'opener': 0},
37 - 'pmHousenumber': {'type': 'string', 'opener': 0},
38 - 'pmPostcode': {'type': 'string', 'opener': 0},
39 - 'pmCity': {'type': 'string', 'opener': 0},
40 - 'pmCounty': {'type': 'string', 'opener': 0},
41 - 'pmState': {'type': 'string', 'opener': 0},
42 - 'pmCountry': {'type': 'string', 'opener': 0},
43 - 'certification': {'type': 'bool', 'opener': 1},
44 - 'certificationFrom': {'type': 'string', 'opener': 0, 'parent': 'certification'}
35 + 'practiceName': {'type': 'string'},
36 + 'pmStreet': {'type': 'string'},
37 + 'pmHousenumber': {'type': 'string'},
38 + 'pmPostcode': {'type': 'string'},
39 + 'pmCity': {'type': 'string'},
40 + 'pmCounty': {'type': 'string'},
41 + 'pmState': {'type': 'string'},
42 + 'pmCountry': {'type': 'string'},
43 + 'certification': {'type': 'bool'},
44 + 'certificationFrom': {'type': 'string'}
45 45  })
46 46  #foreach($property in $classProperties.keySet())
47 47   #if($theDocObj.getProperty($property))
... ... @@ -74,42 +74,25 @@
74 74   "use_captcha": "false"
75 75   })
76 76   #set($thisObj = {})
77 - #set($children = {})
78 - #foreach($item in $classProperties.entrySet())
79 - $item["parent"]
80 - #if($item.parent)
81 - #set($discard = $children[$item.parent].add($item))
82 - #end
83 - #end
84 -$children
85 85   #foreach($item in $classProperties.keySet())
86 86   #set($label = $services.localization.render("homeopaths.classproperty.${item}"))
87 87   #if($theDocObj.getProperty($item))
88 88   #set($value = $theDocObj.getProperty($item).value)
89 - #if($classProperties[$item].type == "bool")
90 - #set($newElem = {
91 - "id" : "$item",
92 - "type" : "checkbox",
93 - "required" : "false",
94 - "label" : "$label",
95 - "value" : "$value",
96 - "data-opener" : "true"
97 - })
98 - #else
99 -## #if($classProperties[$item].opener)
100 - #set($newElem = {
101 - "id": "$item",
102 - "type": "text",
103 - "required" : "false",
104 - "label" : "$label",
105 - "data-create-xobj" : "true",
106 - "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
107 - "data-xobj-fieldname" : "$item",
108 - "value": "$value"
109 - })
110 - #end
111 - #set($thisObj["$item"] = $newElem)
81 + #else
82 + #set($value = "")
112 112   #end
84 + $classProperties[$item].type
85 + #set($newElem = {
86 + "id": "$item",
87 + "type": "text",
88 + "required" : "false",
89 + "label" : "$label",
90 + "data-create-xobj" : "true",
91 + "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
92 + "data-xobj-fieldname" : "$item",
93 + "value": "$value"
94 + })
95 + #set($thisObj["$item"] = $newElem)
113 113   #end
114 114   #set($practiceName = {
115 115   "id": "practiceName",