Исходный код вики Homeopaths
Версия 10.4 от Jip-jan Alunkel на марта 07, 14:03
Скрыть последних авторов
author | version | line-number | content |
---|---|---|---|
![]() |
8.138 | 1 | {{include reference="assets.pagemaker.macros"/}} |
![]() |
8.137 | 2 | |
3 | {{velocity}} | ||
![]() |
8.30 | 4 | #set($discard = $services.localization.use('document', 'homeopaths.Code.translations')) |
![]() |
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})) | ||
![]() |
8.150 | 8 | |
![]() |
8.14 | 9 | {{html wiki="false" clean="false"}} |
![]() |
8.24 | 10 | <p> |
![]() |
8.158 | 11 | All about the page "homeopaths". Where is it for? |
![]() |
8.132 | 12 | </p> |
13 | <div id="homeopaths_map"></div> | ||
![]() |
8.143 | 14 | #if(!$isGuest) |
![]() |
8.146 | 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) | ||
![]() |
9.2 | 21 | <h2 id="add_practice">Add your practice to the map</h2> |
![]() |
2.3 | 22 | #set($form_start = { |
23 | "id": "homeoworld_form", | ||
![]() |
8.3 | 24 | "product": "practice", |
![]() |
2.3 | 25 | "method": "post", |
26 | "url": "", | ||
27 | "use_captcha": "false" | ||
28 | }) | ||
29 | #createFormStart($form_start) | ||
![]() |
8.4 | 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", | ||
![]() |
8.123 | 41 | "data-page-name": "$xcontext.getUserReference().getName()", |
![]() |
8.4 | 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) | ||
![]() |
8.3 | 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", | ||
![]() |
8.159 | 59 | "data-space-xobj-classname": "homeopaths.Code.homeopathsCountryClass", |
![]() |
8.9 | 60 | "data-parent-space": "homeopaths", |
![]() |
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')", | ||
![]() |
8.5 | 67 | "data-query-list-contents" : "key", |
![]() |
8.3 | 68 | "data-query-list-editable" : "false", |
![]() |
8.98 | 69 | "help-block" : 'Input and select the country where your practice resides.' |
![]() |
8.3 | 70 | }) |
71 | #createFormElement($country) | ||
![]() |
2.3 | 72 | #set($address = { |
73 | "id" : "address", | ||
![]() |
8.2 | 74 | "type" : "address", |
![]() |
2.3 | 75 | "required" : "true", |
![]() |
8.149 | 76 | "label" : "Address", |
![]() |
2.3 | 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", | ||
![]() |
4.2 | 81 | "data-query-type" : "address", |
82 | "data-query-reference" : "", | ||
![]() |
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", | ||
![]() |
8.97 | 87 | "help-block" : 'Input street and number, then select the address of your practice.' |
![]() |
2.3 | 88 | }) |
89 | #createFormElement($address) | ||
![]() |
10.2 | 90 | #set($friend = { |
91 | "id" : "friend", | ||
92 | "type" : "hidden", | ||
93 | "value": "$context.getUser()", | ||
94 | "data-create-xobj" : "true", | ||
95 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
96 | "data-xobj-fieldname" : "doc_owner" | ||
97 | }) | ||
![]() |
10.3 | 98 | #createFormElement($friend) |
![]() |
2.3 | 99 | #set($submit = { |
![]() |
8.7 | 100 | "id" : "create_practice", |
101 | "button-text" : "Add practice", | ||
![]() |
2.3 | 102 | "help-block" : "Please remind yourself to always anonymize the case." |
103 | }) | ||
104 | #createSubmit($submit) | ||
105 | #set($form_end = { | ||
106 | "use_captcha": "false" | ||
107 | }) | ||
108 | #createFormEnd($form_end) | ||
![]() |
8.147 | 109 | #end |
![]() |
8.143 | 110 | #end |
![]() |
8.132 | 111 | #end |
![]() |
8.136 | 112 | {{/html}} |
113 | {{/velocity}} |