Código fuente wiki de Homeopaths
Versión 10.13 por Jip-jan Alunkel el marzo 14, 18:39
Ocultar los últimos autores
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? |
![]() |
10.13 | 12 | #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as obj").execute()) |
13 | $q | ||
![]() |
8.132 | 14 | </p> |
15 | <div id="homeopaths_map"></div> | ||
![]() |
8.143 | 16 | #if(!$isGuest) |
![]() |
8.146 | 17 | #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value) |
18 | #if($hasPractice) | ||
![]() |
10.12 | 19 | #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as obj where obj.doc_owner like :usr")) |
![]() |
8.146 | 20 | #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute()) |
21 | #set($practiceExists = $r.size() > 0) | ||
22 | #if(!$practiceExists) | ||
![]() |
9.2 | 23 | <h2 id="add_practice">Add your practice to the map</h2> |
![]() |
2.3 | 24 | #set($form_start = { |
25 | "id": "homeoworld_form", | ||
![]() |
8.3 | 26 | "product": "practice", |
![]() |
2.3 | 27 | "method": "post", |
28 | "url": "", | ||
29 | "use_captcha": "false" | ||
30 | }) | ||
31 | #createFormStart($form_start) | ||
![]() |
8.4 | 32 | #set($practice_name = { |
![]() |
10.10 | 33 | "id" : "practiceName", |
![]() |
8.4 | 34 | "type" : "text", |
35 | "required" : "true", | ||
36 | "label" : "Name of your practice", | ||
37 | "aria-label" : "Enter the name of your practice", | ||
38 | "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')", | ||
39 | "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$", | ||
40 | "data-error-response-type" : "use_label_definite_1", | ||
41 | "data-auto-first-capital" : "true", | ||
42 | "data-query-type" : "XWQL", | ||
![]() |
8.123 | 43 | "data-page-name": "$xcontext.getUserReference().getName()", |
![]() |
8.4 | 44 | "data-query-reference" : "assets.pagemaker.XWQL.matchTitle", |
45 | "data-query-scope" : "homeopaths", | ||
46 | "data-query-list-type" : "suggest-negate", | ||
47 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')", | ||
48 | "data-query-list-contents" : "value", | ||
49 | "data-create-page" : "true", | ||
![]() |
10.6 | 50 | "data-create-xobj" : "true", |
51 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
![]() |
10.9 | 52 | "data-xobj-fieldname" : "practiceName", |
![]() |
8.4 | 53 | "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.' |
54 | }) | ||
55 | #createFormElement($practice_name) | ||
![]() |
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.159 | 64 | "data-space-xobj-classname": "homeopaths.Code.homeopathsCountryClass", |
![]() |
8.9 | 65 | "data-parent-space": "homeopaths", |
![]() |
8.3 | 66 | "data-error-response-type" : "use_label_definite_1", |
67 | "data-auto-first-capital" : "true", | ||
68 | "data-query-type" : "JSON", | ||
69 | "data-query-reference" : "assets.pagemaker.JSON.countries", | ||
70 | "data-query-list-type" : "suggest-select", | ||
71 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
![]() |
8.5 | 72 | "data-query-list-contents" : "key", |
![]() |
8.3 | 73 | "data-query-list-editable" : "false", |
![]() |
8.98 | 74 | "help-block" : 'Input and select the country where your practice resides.' |
![]() |
8.3 | 75 | }) |
76 | #createFormElement($country) | ||
![]() |
2.3 | 77 | #set($address = { |
78 | "id" : "address", | ||
![]() |
8.2 | 79 | "type" : "address", |
![]() |
2.3 | 80 | "required" : "true", |
![]() |
8.149 | 81 | "label" : "Address", |
![]() |
2.3 | 82 | "aria-label" : "Input and select the address of your practice", |
83 | "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')", | ||
84 | "data-error-response-type" : "use_label_definite_1", | ||
85 | "data-auto-first-capital" : "true", | ||
![]() |
4.2 | 86 | "data-query-type" : "address", |
87 | "data-query-reference" : "", | ||
![]() |
2.3 | 88 | "data-query-list-type" : "suggest-select", |
89 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
90 | "data-query-list-contents" : "value/key", | ||
91 | "data-query-list-editable" : "false", | ||
![]() |
10.5 | 92 | "data-create-xobj" : "true", |
93 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
![]() |
8.97 | 94 | "help-block" : 'Input street and number, then select the address of your practice.' |
![]() |
2.3 | 95 | }) |
![]() |
10.5 | 96 | #* |
97 | "data-xobj-fieldname" : "address", | ||
98 | *# | ||
![]() |
2.3 | 99 | #createFormElement($address) |
![]() |
10.2 | 100 | #set($friend = { |
101 | "id" : "friend", | ||
102 | "type" : "hidden", | ||
103 | "value": "$context.getUser()", | ||
104 | "data-create-xobj" : "true", | ||
105 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
106 | "data-xobj-fieldname" : "doc_owner" | ||
107 | }) | ||
![]() |
10.3 | 108 | #createFormElement($friend) |
![]() |
2.3 | 109 | #set($submit = { |
![]() |
8.7 | 110 | "id" : "create_practice", |
111 | "button-text" : "Add practice", | ||
![]() |
2.3 | 112 | "help-block" : "Please remind yourself to always anonymize the case." |
113 | }) | ||
114 | #createSubmit($submit) | ||
115 | #set($form_end = { | ||
116 | "use_captcha": "false" | ||
117 | }) | ||
118 | #createFormEnd($form_end) | ||
![]() |
8.147 | 119 | #end |
![]() |
8.143 | 120 | #end |
![]() |
8.132 | 121 | #end |
![]() |
8.136 | 122 | {{/html}} |
123 | {{/velocity}} |