Changes for page homeopathsSheet
Last modified by Jip-jan Alunkel on March 26, 17:31
From version 3.19
edited by Jip-jan Alunkel
on March 09, 00:59
on March 09, 00:59
Change comment:
Rollback to version 1.38
To version 3.23
edited by Jip-jan Alunkel
on March 09, 01:34
on March 09, 01:34
Change comment:
Rollback to version 1.38
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -37,13 +37,13 @@ 37 37 'practiceName': {'type': 'text', 'extraAttributes': {"disabled": "disabled", "help-block" : 'The name of your practice is the title of this page. If you want to change it, you should edit the content of this page.'}}, 38 38 'editAddress': {'type': 'checkbox', 'opener': 1}, 39 39 'pmAddress': {'type': 'address', 'parent': 'editAddress', '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.'}}, 40 - 'pmStreet': {'type': 'text'}, 41 - 'pmHousenumber': {'type': 'text'}, 42 - 'pmPostcode': {'type': 'text'}, 43 - 'pmCity': {'type': 'text'}, 44 - 'pmCounty': {'type': 'text'}, 45 - 'pmState': {'type': 'text'}, 46 - 'pmCountry': {'type': 'text'}, 40 + 'pmStreet': {'type': 'text', 'disabled': 1}, 41 + 'pmHousenumber': {'type': 'text', 'disabled': 1}, 42 + 'pmPostcode': {'type': 'text', 'disabled': 1}, 43 + 'pmCity': {'type': 'text', 'disabled': 1}, 44 + 'pmCounty': {'type': 'text', 'disabled': 1}, 45 + 'pmState': {'type': 'text', 'disabled': 1}, 46 + 'pmCountry': {'type': 'text', 'disabled': 1}, 47 47 'certification': {'type': 'checkbox', 'opener': 1}, 48 48 'certificationFrom': {'type': 'text', 'parent': 'certification'} 49 49 }) ... ... @@ -129,44 +129,43 @@ 129 129 #set($propertyParent = $item.parent) 130 130 #set($extraAttributes = $item.extraAttributes) 131 131 #set($label = $services.localization.render("homeopaths.classproperty.${propertyName}")) 132 - #if($theDocObj.getProperty($propertyName) || $propertyType == "address") 132 + #if($propertyType == "checkbox" || $propertyType == "radio") 133 + #set($value = "1") 134 + #elseif($theDocObj.getProperty($propertyName) || $propertyType == "address") ## 'address' is not a property in the current class 133 133 #set($value = $theDocObj.getProperty($propertyName).value) 134 - #if($propertyType == "checkbox" || $propertyType == "radio") 135 - #set($value = "1") 136 + #end 137 + #if(!$value) 138 + #set($value = "") 139 + #end 140 + #set($newElem = { 141 + "id" : "$propertyName", 142 + "type" : $propertyType, 143 + "required" : "false", 144 + "label" : "$label", 145 + "data-create-xobj" : "true", 146 + "data-xobj-classname" : $theClass, 147 + "data-xobj-fieldname" : "$propertyName", 148 + "value" : "$value" 149 + }) 150 + #if($extraAttributes.keySet().size() > 0) 151 + #set($attrMap = $extraAttributes) 152 + #foreach($attr in $attrMap.keySet()) 153 + #set($discard = $newElem.put("$attr", $attrMap[$attr])) 136 136 #end 137 - #if(!$value) 138 - #set($value = "") 139 - #end 140 - #set($newElem = { 141 - "id" : "$propertyName", 142 - "type" : $propertyType, 143 - "required" : "false", 144 - "label" : "$label", 145 - "data-create-xobj" : "true", 146 - "data-xobj-classname" : $theClass, 147 - "data-xobj-fieldname" : "$propertyName", 148 - "value" : "$value" 149 - }) 150 - #if($extraAttributes.keySet().size() > 0) 151 - #set($attrMap = $extraAttributes) 152 - #foreach($attr in $attrMap.keySet()) 153 - #set($discard = $newElem.put("$attr", $attrMap[$attr])) 154 - #end 155 - #end 156 - #if($propertyOpener) 157 - #set($discard = $newElem.put("data-opener", "true")) 158 - #end 159 - #if($propertyParent) 160 - #set($lastChild = "$key") 161 - #elseif($lastChild != "") 162 - #set($lastChild = "") 163 - #createExpandEnd() 164 - #end 165 - #createFormElement($newElem) 166 - #if($propertyOpener) 167 - #createExpandStart($newElem $value) 168 - #end 169 169 #end 156 + #if($propertyOpener) 157 + #set($discard = $newElem.put("data-opener", "true")) 158 + #end 159 + #if($propertyParent) 160 + #set($lastChild = "$key") 161 + #elseif($lastChild != "") 162 + #set($lastChild = "") 163 + #createExpandEnd() 164 + #end 165 + #createFormElement($newElem) 166 + #if($propertyOpener) 167 + #createExpandStart($newElem $value) 168 + #end 170 170 #end 171 171 #end 172 172 </div>