Changes for page homeopathsSheet
Last modified by Jip-jan Alunkel on May 08, 19:25
From version 3.87
edited by Jip-jan Alunkel
on March 09, 19:02
on March 09, 19:02
Change comment:
Rollback to version 1.38
To version 3.76
edited by Jip-jan Alunkel
on March 09, 17:26
on March 09, 17:26
Change comment:
Rollback to version 1.38
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -32,7 +32,6 @@ 32 32 #if($xcontext.action == "view") 33 33 <h2 class="inline-data-summary">$services.localization.render("homeopaths.inlineDataSummary.sheet_properties")</h2> 34 34 <div id="${spaceTitle}" class="sheet_properties inline-data-summary"> 35 - ## ADDRESS: Prepare object to provide hidden values to the address input 36 36 #set($xa = {'pmLatlong': '','pmCountry': '','pmState': '','pmCounty': '','pmPostcode': '','pmCity': '','pmStreet': '','pmHousenumber': ''}) 37 37 #foreach($item in $xa.keySet()) 38 38 #if($theDocObj.getProperty("$item")) ... ... @@ -99,87 +99,90 @@ 99 99 </button> 100 100 </div> 101 101 <div class="modal-body"> 102 - <p><label>$services.localization.render("homeopaths.classproperty.pmAddress")</label>#createAddress($theClass)</p> 103 - #set($lastChild = "") 104 - #foreach($propertyName in $classProperties.keySet()) 105 - #set($item = $classProperties["$propertyName"]) 106 - #set($propertyType = $item.type) 107 - #if($item.containsKey("disabled")) 108 - #else 109 - #if($propertyType == "checkbox") 110 - #set($value = "1") 111 - #if($item.containsKey("classless")) 112 - #if(!$item.containsKey("checked")) 113 - #set($item["checked"] = '0') 114 - #end 115 - #else 116 - #set($checkboxPropVal = $theDocObj.getProperty($propertyName).value) 117 - #set($item["checked"] = "$checkboxPropVal") 118 - #end 101 + <fieldset class="fieldset"> 102 +#createAddress($theClass) 103 + </fieldset> 104 +#set($lastChild = "") 105 +#foreach($propertyName in $classProperties.keySet()) 106 + #set($item = $classProperties["$propertyName"]) 107 + #set($propertyType = $item.type) 108 + #if($item.containsKey("disabled")) 109 + #else 110 + #if($propertyType == "checkbox") 111 + #set($value = "1") 112 + #if($item.containsKey("classless")) 113 + #if(!$item.containsKey("checked")) 114 + #set($item["checked"] = '0') 119 119 #end 120 - #if($theDocObj.getProperty($propertyName) || $propertyType == "address") ## 'address' is not a property in the current class 121 - #if($propertyType != "checkbox") 122 - #set($value = $theDocObj.getProperty($propertyName).value) 123 - #end 124 - #end 125 - #set($propertyChecked = $item.checked) 126 - #set($propertyOpener = $item.opener) 127 - #set($propertyParent = $item.parent) 128 - #set($extraAttributes = $item.extraAttributes) 129 - #set($label = $services.localization.render("homeopaths.classproperty.${propertyName}")) 130 - #if(!$value) 131 - #set($value = "") 132 - #end 133 - #if($item.containsKey("classless")) 134 - #set($newElem = { 135 - "id" : "$propertyName", 136 - "type" : $propertyType, 137 - "required" : "false", 138 - "label" : "$label", 139 - "value" : "$value" 140 - }) 141 - #else 142 - #set($newElem = { 143 - "id" : "$propertyName", 144 - "type" : $propertyType, 145 - "required" : "false", 146 - "label" : "$label", 147 - "data-create-xobj" : "true", 148 - "data-xobj-classname" : $theClass, 149 - "data-xobj-fieldname" : "$propertyName", 150 - "value" : "$value" 151 - }) 152 - #end 153 - #if($extraAttributes.keySet().size() > 0) 154 - #set($attrMap = $extraAttributes) 155 - #foreach($attr in $attrMap.keySet()) 156 - #set($discard = $newElem.put("$attr", $attrMap[$attr])) 157 - #end 158 - #end 159 - #if($propertyChecked == '1') 160 - #set($discard = $newElem.put("data-checked", "true")) 161 - #else 162 - #set($discard = $newElem.put("data-checked", "false")) 163 - #end 164 - #if($propertyOpener) 165 - #set($discard = $newElem.put("data-opener", "true")) 166 - #end 167 - #if($propertyParent) 168 - #set($lastChild = "$key") 169 - #elseif($lastChild != "") 170 - #set($lastChild = "") 171 - #createExpandEnd() 172 - #end 173 - #createFormElement($newElem) 174 - #if($propertyOpener) 175 - #createExpandStart($newElem $value) 176 - #end 116 + #else 117 + #set($checkboxPropVal = $theDocObj.getProperty($propertyName).value) 118 + #set($item["checked"] = "${checkboxPropVal}") 177 177 #end 178 178 #end 121 + #if($theDocObj.getProperty($propertyName) || $propertyType == "address") ## 'address' is not a property in the current class 122 + #if($propertyType != "checkbox") 123 + #set($value = $theDocObj.getProperty($propertyName).value) 124 + #end 125 + #end 126 + #set($propertyChecked = $item.checked) 127 + #set($propertyOpener = $item.opener) 128 + #set($propertyParent = $item.parent) 129 + #set($extraAttributes = $item.extraAttributes) 130 + #set($label = $services.localization.render("homeopaths.classproperty.${propertyName}")) 131 + #if(!$value) 132 + #set($value = "") 133 + #end 134 +$propertyChecked 135 + #if($item.containsKey("classless")) 136 + #set($newElem = { 137 + "id" : "$propertyName", 138 + "type" : $propertyType, 139 + "required" : "false", 140 + "label" : "$label", 141 + "value" : "$value" 142 + }) 143 + #else 144 + #set($newElem = { 145 + "id" : "$propertyName", 146 + "type" : $propertyType, 147 + "required" : "false", 148 + "label" : "$label", 149 + "data-create-xobj" : "true", 150 + "data-xobj-classname" : $theClass, 151 + "data-xobj-fieldname" : "$propertyName", 152 + "value" : "$value" 153 + }) 154 + #end 155 + #if($extraAttributes.keySet().size() > 0) 156 + #set($attrMap = $extraAttributes) 157 + #foreach($attr in $attrMap.keySet()) 158 + #set($discard = $newElem.put("$attr", $attrMap[$attr])) 159 + #end 160 + #end 161 + #if($propertyChecked == '1') 162 + #set($discard = $newElem.put("data-checked", "true")) 163 + #else 164 + #set($discard = $newElem.put("data-checked", "false")) 165 + #end 166 + #if($propertyOpener) 167 + #set($discard = $newElem.put("data-opener", "true")) 168 + #end 169 + #if($propertyParent) 170 + #set($lastChild = "$key") 171 + #elseif($lastChild != "") 172 + #set($lastChild = "") 173 + #createExpandEnd() 174 + #end 175 + #createFormElement($newElem) 176 + #if($propertyOpener) 177 + #createExpandStart($newElem $value) 178 + #end 179 + #end 180 +#end 179 179 </div> 180 180 <div class="modal-footer"> 181 181 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> 182 - #createSubmit($submit) 184 + #createSubmit($submit) 183 183 </div> 184 184 #createFormEnd($form_end) 185 185 </div> ... ... @@ -188,11 +188,14 @@ 188 188 #end 189 189 #else 190 190 <p> 191 - This page can not be viewed in inline mode. [[Back>>$doc.fullName]]193 + This page can not be viewed in inline mode. 192 192 </p> 193 193 #end 196 + 194 194 #macro(createAddress $className) 195 195 #set($docObj = $doc.getObject($className)) 199 + <address> 200 + $doc.getTitle()<br /> 196 196 #set($addressArray = ['pmStreet','pmHousenumber','pmPostcode','pmCity','pmState','pmCounty','pmCountry']) 197 197 #set($x = {}) 198 198 #foreach($datapart in $addressArray) ... ... @@ -204,8 +204,6 @@ 204 204 #set($discard = $x.put("$datapart", $datapart4Publish)) 205 205 #end 206 206 #end 207 - <address> 208 - $doc.getTitle()<br /> 209 209 $x['pmStreet'] $x['pmHousenumber']<br /> 210 210 $x['pmPostcode'] $x['pmCity']<br /> 211 211 $x['pmCounty'] $x['pmState']<br /> ... ... @@ -212,6 +212,5 @@ 212 212 $x['pmCountry'] 213 213 </address> 214 214 #end 215 - 216 216 {{/html}} 217 217 {{/velocity}}