Wiki source code of Homeopaths

Version 10.25 by Jip-jan Alunkel on March 14, 19:07

Show last authors
1 {{include reference="assets.pagemaker.macros"/}}
2
3 {{velocity}}
4 #set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
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}))
8
9 {{html wiki="false" clean="false"}}
10 <p>
11 All about the page "homeopaths". Where is it for?
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())
14
15 ##.anyChars()
16 $ar
17 $xcontext.getUserReference().getName()
18 </p>
19 <div id="homeopaths_map"></div>
20 #if(!$isGuest)
21 #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value)
22 #if($hasPractice)
23 #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as obj where obj.doc_owner like :usr"))
24 #set($r = $q.bindValue('usr').literal("${xcontext}.getUserReference().getName()").query().execute())
25 #set($practiceExists = $r.size() > 0)
26 #if(!$practiceExists)
27 <h2 id="add_practice">Add your practice to the map</h2>
28 #set($form_start = {
29 "id": "homeoworld_form",
30 "product": "practice",
31 "method": "post",
32 "url": "",
33 "use_captcha": "false"
34 })
35 #createFormStart($form_start)
36 #set($practice_name = {
37 "id" : "practiceName",
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",
47 "data-page-name": "$xcontext.getUserReference().getName()",
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",
54 "data-create-xobj" : "true",
55 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
56 "data-xobj-fieldname" : "practiceName",
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)
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",
68 "data-space-xobj-classname": "homeopaths.Code.homeopathsCountryClass",
69 "data-parent-space": "homeopaths",
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')",
76 "data-query-list-contents" : "key",
77 "data-query-list-editable" : "false",
78 "help-block" : 'Input and select the country where your practice resides.'
79 })
80 #createFormElement($country)
81 #set($address = {
82 "id" : "address",
83 "type" : "address",
84 "required" : "true",
85 "label" : "Address",
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",
90 "data-query-type" : "address",
91 "data-query-reference" : "",
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",
96 "data-create-xobj" : "true",
97 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
98 "help-block" : 'Input street and number, then select the address of your practice.'
99 })
100 #*
101 "data-xobj-fieldname" : "address",
102 *#
103 #createFormElement($address)
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 })
112 #createFormElement($friend)
113 #set($submit = {
114 "id" : "create_practice",
115 "button-text" : "Add practice",
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)
123 #end
124 #end
125 #end
126 {{/html}}
127 {{/velocity}}