Исходный код вики Homeopaths

Версия 8.144 от Jip-jan Alunkel на декабря 24, 13:40

Скрыть последних авторов
Jip-jan Alunkel 8.138 1 {{include reference="assets.pagemaker.macros"/}}
Jip-jan Alunkel 8.137 2
3 {{velocity}}
Jip-jan Alunkel 8.30 4 #set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
Jip-jan Alunkel 8.134 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}))
Jip-jan Alunkel 8.14 8 {{html wiki="false" clean="false"}}
Jip-jan Alunkel 8.24 9 <p>
Jip-jan Alunkel 8.23 10 All about homeopaths.
Jip-jan Alunkel 8.132 11 </p>
12 <div id="homeopaths_map"></div>
Jip-jan Alunkel 8.143 13 #if(!$isGuest)
Jip-jan Alunkel 8.128 14
Jip-jan Alunkel 8.144 15 #set($haspractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice'))
16 $haspractice
Jip-jan Alunkel 8.143 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($practice_exists = $r.size() > 0)
20 #if(!$practice_exists)
21
Jip-jan Alunkel 8.25 22 <h2>Add your practice to the map</h2>
Jip-jan Alunkel 2.3 23 #set($form_start = {
24 "id": "homeoworld_form",
Jip-jan Alunkel 8.3 25 "product": "practice",
Jip-jan Alunkel 2.3 26 "method": "post",
27 "url": "",
28 "use_captcha": "false"
29 })
30 #createFormStart($form_start)
Jip-jan Alunkel 8.4 31 #set($practice_name = {
32 "id" : "practice_name",
33 "type" : "text",
34 "required" : "true",
35 "label" : "Name of your practice",
36 "aria-label" : "Enter the name of your practice",
37 "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')",
38 "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$",
39 "data-error-response-type" : "use_label_definite_1",
40 "data-auto-first-capital" : "true",
41 "data-query-type" : "XWQL",
Jip-jan Alunkel 8.123 42 "data-page-name": "$xcontext.getUserReference().getName()",
Jip-jan Alunkel 8.4 43 "data-query-reference" : "assets.pagemaker.XWQL.matchTitle",
44 "data-query-scope" : "homeopaths",
45 "data-query-list-type" : "suggest-negate",
46 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')",
47 "data-query-list-contents" : "value",
48 "data-create-page" : "true",
49 "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
50 })
51 #createFormElement($practice_name)
Jip-jan Alunkel 8.3 52 #set($country = {
53 "id" : "country",
54 "type" : "text",
55 "required" : "true",
56 "label" : "Country of practice residence",
57 "aria-label" : "Choose the country",
58 "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')",
59 "data-set-space": "true",
Jip-jan Alunkel 8.9 60 "data-parent-space": "homeopaths",
Jip-jan Alunkel 8.3 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')",
Jip-jan Alunkel 8.5 67 "data-query-list-contents" : "key",
Jip-jan Alunkel 8.3 68 "data-query-list-editable" : "false",
Jip-jan Alunkel 8.98 69 "help-block" : 'Input and select the country where your practice resides.'
Jip-jan Alunkel 8.3 70 })
71 #createFormElement($country)
Jip-jan Alunkel 2.3 72 #set($address = {
73 "id" : "address",
Jip-jan Alunkel 8.2 74 "type" : "address",
Jip-jan Alunkel 2.3 75 "required" : "true",
76 "label" : "Address of your practice",
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",
Jip-jan Alunkel 4.2 81 "data-query-type" : "address",
82 "data-query-reference" : "",
Jip-jan Alunkel 2.3 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",
Jip-jan Alunkel 8.97 90 "help-block" : 'Input street and number, then select the address of your practice.'
Jip-jan Alunkel 2.3 91 })
92 #createFormElement($address)
93 #set($submit = {
Jip-jan Alunkel 8.7 94 "id" : "create_practice",
95 "button-text" : "Add practice",
Jip-jan Alunkel 2.3 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)
Jip-jan Alunkel 8.143 103 #end
Jip-jan Alunkel 8.132 104 #end
Jip-jan Alunkel 8.136 105 {{/html}}
106 {{/velocity}}