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