Wiki broncode van Homeopaths

Version 8.140 by Jip-jan Alunkel on december 22, 14:55

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