Wiki source code of Homeopaths

Version 10.18 by Jip-jan Alunkel on março 14, 19:00

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