Wiki source code of Homeopaths

Version 10.23 by Jip-jan Alunkel on March 14, 19:06

Hide last authors
Jip-jan Alunkel 8.138 1 {{include reference="assets.pagemaker.macros"/}}
Jip-jan Alunkel 8.137 2
3 {{velocity}}
Jip-jan Alunkel 8.30 4 #set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
Jip-jan Alunkel 8.134 5 #set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
6 #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false}))
7 #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false}))
Jip-jan Alunkel 8.150 8
Jip-jan Alunkel 8.14 9 {{html wiki="false" clean="false"}}
Jip-jan Alunkel 8.24 10 <p>
Jip-jan Alunkel 8.158 11 All about the page "homeopaths". Where is it for?
Jip-jan Alunkel 10.23 12 #set($aq = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as homepath where homepath.doc_owner like :usr"))
13 #set($ar = $q.bindValue('usr').literal("${xcontext}.getUserReference().getName()").anyChars().query().execute())
Jip-jan Alunkel 10.22 14
Jip-jan Alunkel 10.16 15 ##.anyChars()
Jip-jan Alunkel 10.22 16 $q.execute()
Jip-jan Alunkel 10.14 17 $xcontext.getUserReference().getName()
Jip-jan Alunkel 8.132 18 </p>
19 <div id="homeopaths_map"></div>
Jip-jan Alunkel 8.143 20 #if(!$isGuest)
Jip-jan Alunkel 8.146 21 #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value)
22 #if($hasPractice)
Jip-jan Alunkel 10.12 23 #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as obj where obj.doc_owner like :usr"))
Jip-jan Alunkel 10.21 24 #set($r = $q.bindValue('usr').literal("${xcontext}.getUserReference().getName()").query().execute())
Jip-jan Alunkel 8.146 25 #set($practiceExists = $r.size() > 0)
26 #if(!$practiceExists)
Jip-jan Alunkel 9.2 27 <h2 id="add_practice">Add your practice to the map</h2>
Jip-jan Alunkel 2.3 28 #set($form_start = {
29 "id": "homeoworld_form",
Jip-jan Alunkel 8.3 30 "product": "practice",
Jip-jan Alunkel 2.3 31 "method": "post",
32 "url": "",
33 "use_captcha": "false"
34 })
35 #createFormStart($form_start)
Jip-jan Alunkel 8.4 36 #set($practice_name = {
Jip-jan Alunkel 10.10 37 "id" : "practiceName",
Jip-jan Alunkel 8.4 38 "type" : "text",
39 "required" : "true",
40 "label" : "Name of your practice",
41 "aria-label" : "Enter the name of your practice",
42 "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')",
43 "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$",
44 "data-error-response-type" : "use_label_definite_1",
45 "data-auto-first-capital" : "true",
46 "data-query-type" : "XWQL",
Jip-jan Alunkel 8.123 47 "data-page-name": "$xcontext.getUserReference().getName()",
Jip-jan Alunkel 8.4 48 "data-query-reference" : "assets.pagemaker.XWQL.matchTitle",
49 "data-query-scope" : "homeopaths",
50 "data-query-list-type" : "suggest-negate",
51 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')",
52 "data-query-list-contents" : "value",
53 "data-create-page" : "true",
Jip-jan Alunkel 10.6 54 "data-create-xobj" : "true",
55 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
Jip-jan Alunkel 10.9 56 "data-xobj-fieldname" : "practiceName",
Jip-jan Alunkel 8.4 57 "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
58 })
59 #createFormElement($practice_name)
Jip-jan Alunkel 8.3 60 #set($country = {
61 "id" : "country",
62 "type" : "text",
63 "required" : "true",
64 "label" : "Country of practice residence",
65 "aria-label" : "Choose the country",
66 "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')",
67 "data-set-space": "true",
Jip-jan Alunkel 8.159 68 "data-space-xobj-classname": "homeopaths.Code.homeopathsCountryClass",
Jip-jan Alunkel 8.9 69 "data-parent-space": "homeopaths",
Jip-jan Alunkel 8.3 70 "data-error-response-type" : "use_label_definite_1",
71 "data-auto-first-capital" : "true",
72 "data-query-type" : "JSON",
73 "data-query-reference" : "assets.pagemaker.JSON.countries",
74 "data-query-list-type" : "suggest-select",
75 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')",
Jip-jan Alunkel 8.5 76 "data-query-list-contents" : "key",
Jip-jan Alunkel 8.3 77 "data-query-list-editable" : "false",
Jip-jan Alunkel 8.98 78 "help-block" : 'Input and select the country where your practice resides.'
Jip-jan Alunkel 8.3 79 })
80 #createFormElement($country)
Jip-jan Alunkel 2.3 81 #set($address = {
82 "id" : "address",
Jip-jan Alunkel 8.2 83 "type" : "address",
Jip-jan Alunkel 2.3 84 "required" : "true",
Jip-jan Alunkel 8.149 85 "label" : "Address",
Jip-jan Alunkel 2.3 86 "aria-label" : "Input and select the address of your practice",
87 "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')",
88 "data-error-response-type" : "use_label_definite_1",
89 "data-auto-first-capital" : "true",
Jip-jan Alunkel 4.2 90 "data-query-type" : "address",
91 "data-query-reference" : "",
Jip-jan Alunkel 2.3 92 "data-query-list-type" : "suggest-select",
93 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')",
94 "data-query-list-contents" : "value/key",
95 "data-query-list-editable" : "false",
Jip-jan Alunkel 10.5 96 "data-create-xobj" : "true",
97 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
Jip-jan Alunkel 8.97 98 "help-block" : 'Input street and number, then select the address of your practice.'
Jip-jan Alunkel 2.3 99 })
Jip-jan Alunkel 10.5 100 #*
101 "data-xobj-fieldname" : "address",
102 *#
Jip-jan Alunkel 2.3 103 #createFormElement($address)
Jip-jan Alunkel 10.2 104 #set($friend = {
105 "id" : "friend",
106 "type" : "hidden",
107 "value": "$context.getUser()",
108 "data-create-xobj" : "true",
109 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
110 "data-xobj-fieldname" : "doc_owner"
111 })
Jip-jan Alunkel 10.3 112 #createFormElement($friend)
Jip-jan Alunkel 2.3 113 #set($submit = {
Jip-jan Alunkel 8.7 114 "id" : "create_practice",
115 "button-text" : "Add practice",
Jip-jan Alunkel 2.3 116 "help-block" : "Please remind yourself to always anonymize the case."
117 })
118 #createSubmit($submit)
119 #set($form_end = {
120 "use_captcha": "false"
121 })
122 #createFormEnd($form_end)
Jip-jan Alunkel 8.147 123 #end
Jip-jan Alunkel 8.143 124 #end
Jip-jan Alunkel 8.132 125 #end
Jip-jan Alunkel 8.136 126 {{/html}}
127 {{/velocity}}