Changes for page homeopathsSheet

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

From version 1.71
edited by Jip-jan Alunkel
on March 08, 14:14
Change comment: There is no comment for this version
To version 1.67
edited by Jip-jan Alunkel
on March 08, 01:18
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -32,22 +32,19 @@
32 32  #if($xcontext.action == "view")
33 33  <div id="${spaceTitle}" class="box sheet_properties">
34 34   <h2>Details</h2>
35 -## The classProperties Map has to be in the order of how you want the form elements to appear in the form.
36 -#set($classProperties = [
37 - {'practiceName': {'type': 'text', 'opener': 0}},
38 - {'pmStreet': {'type': 'text', 'opener': 0}},
39 - {'pmHousenumber': {'type': 'text', 'opener': 0, 'parent': 'certification'}},
40 - {'pmPostcode': {'type': 'text', 'opener': 0}},
41 - {'pmCity': {'type': 'text', 'opener': 0}},
42 - {'pmCounty': {'type': 'text', 'opener': 0, 'parent': 'certification'}},
43 - {'pmState': {'type': 'text', 'opener': 0}},
44 - {'pmCountry': {'type': 'text', 'opener': 0}},
45 - {'certification': {'type': 'checkbox', 'opener': 1}},
46 - {'certificationFrom': {'type': 'text', 'opener': 0, 'parent': 'certification'}}
47 -])
48 -#foreach($property in $classProperties)
49 - $property.keySet()[0]
50 -#*
35 +#set($classProperties = {
36 + 'practiceName': {'type': 'text', 'opener': 0},
37 + 'pmStreet': {'type': 'text', 'opener': 0},
38 + 'pmHousenumber': {'type': 'text', 'opener': 0, 'parent': 'certification'},
39 + 'pmPostcode': {'type': 'text', 'opener': 0},
40 + 'pmCity': {'type': 'text', 'opener': 0},
41 + 'pmCounty': {'type': 'text', 'opener': 0, 'parent': 'certification'},
42 + 'pmState': {'type': 'text', 'opener': 0},
43 + 'pmCountry': {'type': 'text', 'opener': 0},
44 + 'certification': {'type': 'checkbox', 'opener': 1},
45 + 'certificationFrom': {'type': 'text', 'opener': 0, 'parent': 'certification'}
46 +})
47 +#foreach($property in $classProperties.keySet())
51 51   #if($theDocObj.getProperty($property))
52 52   <p class="property">
53 53   #if($theDocObj.getProperty($property).value != "" && $property != "pmHousenumber") ## Difference with added housenumber because of the streetaddress layout.
... ... @@ -59,8 +59,6 @@
59 59   </p>
60 60   #end
61 61   #end
62 -*#
63 -
64 64  #end
65 65  
66 66   #if($hasRight)
... ... @@ -81,20 +81,19 @@
81 81   })
82 82   #set($thisObj = {})
83 83   #set($children = {})
84 - #set($nonChildren = {})
79 +$classProperties
85 85   #foreach($item in $classProperties.keySet())
86 - #if($classProperties[$item].opener == 1)
81 + #if($classProperties[$item].parent)
87 87   #set($parentID = $classProperties[$item].parent)
88 88   #if(!$children[$parentID])
89 89   #set($discard = $children.put("$parentID", {}))
90 90   #end
91 91   #set($discard = $children["$parentID"].put($item, $classProperties[$item]))
92 - #elseif($classProperties[$item].parent)## ???? Ws fout
93 - #else
94 - #set($discard = $nonChildren.put($item, $classProperties[$item]))
87 + #set($discard = $classProperties.delete("$item"))
95 95   #end
96 96   #end
97 - #createElementObjects($nonChildren)
90 +$classProperties
91 +#createElementObjects($classProperties)
98 98   #set($submit = {
99 99   "id" : "edit_details",
100 100   "button-text" : "Save changes",