Wiki source code of Homeopaths

Version 10.46 by Jip-jan Alunkel on March 14, 19:33

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