Changes for page homeopathsSheet
Last modified by Jip-jan Alunkel on March 26, 17:31
From version 1.114
edited by Jip-jan Alunkel
on March 08, 15:41
on March 08, 15:41
Change comment:
There is no comment for this version
To version 1.125
edited by Jip-jan Alunkel
on March 08, 18:20
on March 08, 18:20
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -35,11 +35,12 @@ 35 35 ## The classProperties Map has to be in the order of how you want the form elements to appear in the form. 36 36 #set($classProperties = [ 37 37 {'practiceName': {'type': 'text'}}, 38 + {'pmAddress': {'type': 'address', 'extraAttributes': {"aria-label": "Input and select the address of your practice", "placeholder": "$services.localization.render('homeopaths.multiword.address.placeholder')", "data-auto-first-capital": "true", "data-query-type": "address", "data-query-reference": "", "data-query-list-type": "suggest-select", "data-query-list-header": "$services.localization.render('pagemaker.line.suggest_select_list')", "data-query-list-contents": "value/key", "data-query-list-editable": "false", "data-create-xobj": "true", "data-xobj-classname": "homeopaths.Code.homeopathsClass", "help-block" : 'Input street and number, then select the address of your practice.'}}}, 38 38 {'pmStreet': {'type': 'text'}}, 39 - {'pmHousenumber': {'type': 'text' , 'parent': 'certification'}},40 + {'pmHousenumber': {'type': 'text'}}, 40 40 {'pmPostcode': {'type': 'text'}}, 41 41 {'pmCity': {'type': 'text'}}, 42 - {'pmCounty': {'type': 'text' , 'parent': 'certification'}},43 + {'pmCounty': {'type': 'text'}}, 43 43 {'pmState': {'type': 'text'}}, 44 44 {'pmCountry': {'type': 'text'}}, 45 45 {'certification': {'type': 'checkbox', 'opener': 1}}, ... ... @@ -62,24 +62,6 @@ 62 62 "url": "", 63 63 "use_captcha": "false" 64 64 }) 65 -#* #set($thisObj = {}) 66 - #set($children = {}) 67 - #set($nonChildren = {}) 68 - #foreach($item in $classProperties.keySet()) 69 - #if($classProperties[$item].opener == 1) 70 - #set($parentID = $classProperties[$item].parent) 71 - #if(!$children[$parentID]) 72 - #set($discard = $children.put("$parentID", {})) 73 - #end 74 - #set($discard = $children["$parentID"].put($item, $classProperties[$item])) 75 - #elseif($classProperties[$item].parent)## ???? Ws fout 76 - #else 77 - #set($discard = $nonChildren.put($item, $classProperties[$item])) 78 - #end 79 - #end 80 -## #createElementObjects($nonChildren) 81 -*# 82 - 83 83 #set($submit = { 84 84 "id" : "edit_details", 85 85 "button-text" : "Save changes", ... ... @@ -116,9 +116,8 @@ 116 116 #if($theDocObj.getProperty($key)) 117 117 #set($value = $theDocObj.getProperty($key).value) 118 118 #if(!$value) 119 - #set($value = "") 102 + #set($value = "1") 120 120 #end 121 -## $key : $value<br /> 122 122 #set($newElem = { 123 123 "id" : "$key", 124 124 "type" : $propertyType, ... ... @@ -142,29 +142,13 @@ 142 142 #set($lastChild = "$key") 143 143 #elseif($lastChild != "") 144 144 #set($lastChild = "") 145 - ###createExpandEnd()127 + #createExpandEnd() 146 146 #end 147 147 #createFormElement($newElem) 148 - $lastChild 149 149 #if($propertyOpener) 150 - ###createExpandStart($newElem $newElem["value"])131 + #createExpandStart($newElem $newElem["value"]) 151 151 #end 152 152 #end 153 - 154 -#* 155 - #if($theDocObj.getProperty($property)) 156 - <p class="property"> 157 - #if($theDocObj.getProperty($property).value != "" && $property != "pmHousenumber") ## Difference with added housenumber because of the streetaddress layout. 158 - #if($property == "pmStreet") ## Difference with added housenumber because of the streetaddress layout. 159 - <span class="property-name">$services.localization.render("homeopaths.classproperty.address")</span> <span class="property-value">$doc.display($property) $doc.display("pmHousenumber")</span> 160 - #else 161 - <span class="property-name">$services.localization.render("homeopaths.classproperty.${property}")</span> <span class="property-value">$doc.display($property)</span> 162 - #end 163 - </p> 164 - #end 165 - #end 166 -*# 167 - 168 168 #end 169 169 </div> 170 170 <div class="modal-footer"> ... ... @@ -180,7 +180,7 @@ 180 180 This page can not be viewed in inline mode. 181 181 #end 182 182 183 -#macro(createElementObject $properties) 149 +#macro(createElementObjects $properties) 184 184 #foreach($item in $properties.keySet()) 185 185 #set($label = $services.localization.render("homeopaths.classproperty.${item}")) 186 186 #if($theDocObj.getProperty($item))