Changes for page homeopathsSheet
Last modified by Jip-jan Alunkel on March 26, 17:31
From version 1.62
edited by Jip-jan Alunkel
on March 08, 00:53
on March 08, 00:53
Change comment:
There is no comment for this version
To version 1.70
edited by Jip-jan Alunkel
on March 08, 14:13
on March 08, 14:13
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -32,19 +32,22 @@ 32 32 #if($xcontext.action == "view") 33 33 <div id="${spaceTitle}" class="box sheet_properties"> 34 34 <h2>Details</h2> 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()) 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 50 +#* 48 48 #if($theDocObj.getProperty($property)) 49 49 <p class="property"> 50 50 #if($theDocObj.getProperty($property).value != "" && $property != "pmHousenumber") ## Difference with added housenumber because of the streetaddress layout. ... ... @@ -56,6 +56,8 @@ 56 56 </p> 57 57 #end 58 58 #end 62 +*# 63 + 59 59 #end 60 60 61 61 #if($hasRight) ... ... @@ -76,16 +76,20 @@ 76 76 }) 77 77 #set($thisObj = {}) 78 78 #set($children = {}) 84 + #set($nonChildren = {}) 79 79 #foreach($item in $classProperties.keySet()) 80 - #if($classProperties[$item].p arent)86 + #if($classProperties[$item].opener == 1) 81 81 #set($parentID = $classProperties[$item].parent) 82 82 #if(!$children[$parentID]) 83 83 #set($discard = $children.put("$parentID", {})) 84 84 #end 85 85 #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])) 86 86 #end 87 87 #end 88 - #createElementObjects($ classProperties)97 + #createElementObjects($nonChildren) 89 89 #set($submit = { 90 90 "id" : "edit_details", 91 91 "button-text" : "Save changes", ... ... @@ -107,11 +107,8 @@ 107 107 </div> 108 108 <div class="modal-body"> 109 109 #foreach($obj in $thisObj) 110 - $obj 111 -## #createFormElement($obj) 119 + #createFormElement($obj) 112 112 #end 113 -## #createFormElement($practiceName) 114 -## #createFormElement($city) 115 115 </div> 116 116 <div class="modal-footer"> 117 117 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>