Changes for page homeopathsSheet

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

From version 3.11
edited by Jip-jan Alunkel
on March 09, 00:22
Change comment: Rollback to version 1.38
To version 3.19
edited by Jip-jan Alunkel
on March 09, 00:59
Change comment: Rollback to version 1.38

Summary

Details

Page properties
Content
... ... @@ -35,7 +35,8 @@
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', '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 - '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 + 'editAddress': {'type': 'checkbox', 'opener': 1},
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.'}},
39 39   'pmStreet': {'type': 'text'},
40 40   'pmHousenumber': {'type': 'text'},
41 41   'pmPostcode': {'type': 'text'},
... ... @@ -101,10 +101,21 @@
101 101   <fieldset class="fieldset">
102 102   <address>
103 103  $doc.getTitle()<br />
104 -$theDocObj.getProperty('pmStreet') $theDocObj.getProperty('pmHousenumber')<br /><br />
105 -$theDocObj.getProperty('pmPostcode') $theDocObj.getProperty('pmCity')<br />
106 -$theDocObj.getProperty('pmCounty,') $theDocObj.getProperty('pmState')<br />
107 -$theDocObj.getProperty('pmCountry').toUpperCase()
105 +#set($addressArray = ['pmStreet','pmHousenumber','pmPostcode','pmCity','pmState','pmCounty','pmCountry'])
106 +#set($x = {})
107 +#foreach($datapart in $addressArray)
108 + #if($theDocObj.getProperty($datapart))
109 + #set($datapart4Publish = $theDocObj.getProperty($datapart).value)
110 + #if($datapart == 'pmCountry')
111 + #set($datapart4Publish = $datapart4Publish.toUpperCase())
112 + #end
113 + #set($discard = $x.put("$datapart", $datapart4Publish))
114 + #end
115 +#end
116 +$x['pmStreet'] $x['pmHousenumber']<br />
117 +$x['pmPostcode'] $x['pmCity']<br />
118 +$x['pmCounty'] $x['pmState']<br />
119 +$x['pmCountry']
108 108   </address>
109 109   </fieldset>
110 110  #set($lastChild = "")