Wiki source code of Homeopaths

Version 10.13 by Jip-jan Alunkel on março 14, 18:39

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