Исходный код вики Homeopaths
Версия 8.129 от Jip-jan Alunkel на декабря 09, 20:16
Скрыть последних авторов
author | version | line-number | content |
---|---|---|---|
![]() |
2.3 | 1 | {{include reference="assets.pagemaker.macros"/}} |
2 | |||
3 | {{velocity}} | ||
![]() |
8.30 | 4 | #set($discard = $services.localization.use('document', 'homeopaths.Code.translations')) |
![]() |
2.3 | 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 | |||
![]() |
8.14 | 9 | {{html wiki="false" clean="false"}} |
![]() |
8.24 | 10 | <p> |
![]() |
8.23 | 11 | All about homeopaths. |
![]() |
8.113 | 12 | |
![]() |
8.126 | 13 | #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr")) |
![]() |
8.128 | 14 | #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute()) |
15 | |||
![]() |
8.127 | 16 | #if($r.size() > 0) |
17 | Practice page exists. | ||
18 | #else | ||
19 | No practice page. | ||
20 | #end | ||
![]() |
8.73 | 21 | </p> |
22 | <div id="homeopaths_map"></div> | ||
![]() |
8.44 | 23 | |
![]() |
8.107 | 24 | |
![]() |
8.25 | 25 | <h2>Add your practice to the map</h2> |
![]() |
2.3 | 26 | #set($form_start = { |
27 | "id": "homeoworld_form", | ||
![]() |
8.3 | 28 | "product": "practice", |
![]() |
2.3 | 29 | "method": "post", |
30 | "url": "", | ||
31 | "use_captcha": "false" | ||
32 | }) | ||
33 | #createFormStart($form_start) | ||
![]() |
8.4 | 34 | #set($practice_name = { |
35 | "id" : "practice_name", | ||
36 | "type" : "text", | ||
37 | "required" : "true", | ||
38 | "label" : "Name of your practice", | ||
39 | "aria-label" : "Enter the name of your practice", | ||
40 | "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')", | ||
41 | "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$", | ||
42 | "data-error-response-type" : "use_label_definite_1", | ||
43 | "data-auto-first-capital" : "true", | ||
44 | "data-query-type" : "XWQL", | ||
![]() |
8.123 | 45 | "data-page-name": "$xcontext.getUserReference().getName()", |
![]() |
8.4 | 46 | "data-query-reference" : "assets.pagemaker.XWQL.matchTitle", |
47 | "data-query-scope" : "homeopaths", | ||
48 | "data-query-list-type" : "suggest-negate", | ||
49 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')", | ||
50 | "data-query-list-contents" : "value", | ||
51 | "data-create-page" : "true", | ||
52 | "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.' | ||
53 | }) | ||
54 | #createFormElement($practice_name) | ||
55 | |||
![]() |
8.3 | 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", | ||
![]() |
8.9 | 64 | "data-parent-space": "homeopaths", |
![]() |
8.3 | 65 | "data-error-response-type" : "use_label_definite_1", |
66 | "data-auto-first-capital" : "true", | ||
67 | "data-query-type" : "JSON", | ||
68 | "data-query-reference" : "assets.pagemaker.JSON.countries", | ||
69 | "data-query-list-type" : "suggest-select", | ||
70 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
![]() |
8.5 | 71 | "data-query-list-contents" : "key", |
![]() |
8.3 | 72 | "data-query-list-editable" : "false", |
![]() |
8.98 | 73 | "help-block" : 'Input and select the country where your practice resides.' |
![]() |
8.3 | 74 | }) |
75 | #createFormElement($country) | ||
![]() |
6.2 | 76 | |
![]() |
8.8 | 77 | #* |
78 | "data-create-xobj" : "true", | ||
79 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
80 | "data-xobj-fieldname" : "country", | ||
81 | *# | ||
82 | |||
![]() |
2.3 | 83 | #set($address = { |
84 | "id" : "address", | ||
![]() |
8.2 | 85 | "type" : "address", |
![]() |
2.3 | 86 | "required" : "true", |
87 | "label" : "Address of your practice", | ||
88 | "aria-label" : "Input and select the address of your practice", | ||
89 | "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')", | ||
90 | "data-error-response-type" : "use_label_definite_1", | ||
91 | "data-auto-first-capital" : "true", | ||
![]() |
4.2 | 92 | "data-query-type" : "address", |
93 | "data-query-reference" : "", | ||
![]() |
2.3 | 94 | "data-query-list-type" : "suggest-select", |
95 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
96 | "data-query-list-contents" : "value/key", | ||
97 | "data-query-list-editable" : "false", | ||
98 | "data-create-xobj" : "true", | ||
99 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
100 | "data-xobj-fieldname" : "address", | ||
![]() |
8.97 | 101 | "help-block" : 'Input street and number, then select the address of your practice.' |
![]() |
2.3 | 102 | }) |
103 | #createFormElement($address) | ||
104 | #set($submit = { | ||
![]() |
8.7 | 105 | "id" : "create_practice", |
106 | "button-text" : "Add practice", | ||
![]() |
2.3 | 107 | "help-block" : "Please remind yourself to always anonymize the case." |
108 | }) | ||
109 | #createSubmit($submit) | ||
110 | #set($form_end = { | ||
111 | "use_captcha": "false" | ||
112 | }) | ||
113 | #createFormEnd($form_end) | ||
114 |