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