Wiki broncode van Homeopaths

Version 10.1 by Jip-jan Alunkel on februari 19, 18:36

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