Wiki broncode van Homeopaths
Version 10.18 by Jip-jan Alunkel on maart 14, 19:00
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.17 | 12 | #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as homepath where homepath.doc_owner like '%.jipjanalunkel'").query().execute()) |
![]() |
10.16 | 13 | ##.anyChars() |
![]() |
10.17 | 14 | $q |
![]() |
10.14 | 15 | $xcontext.getUserReference().getName() |
![]() |
8.132 | 16 | </p> |
17 | <div id="homeopaths_map"></div> | ||
![]() |
8.143 | 18 | #if(!$isGuest) |
![]() |
8.146 | 19 | #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value) |
20 | #if($hasPractice) | ||
![]() |
10.12 | 21 | #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as obj where obj.doc_owner like :usr")) |
![]() |
10.18 | 22 | #set($r = $q.bindValue('usr').literal("${xcontext.getUserReference().getName()}").query().execute()) |
![]() |
8.146 | 23 | #set($practiceExists = $r.size() > 0) |
24 | #if(!$practiceExists) | ||
![]() |
9.2 | 25 | <h2 id="add_practice">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 = { |
![]() |
10.10 | 35 | "id" : "practiceName", |
![]() |
8.4 | 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", | ||
![]() |
10.6 | 52 | "data-create-xobj" : "true", |
53 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
![]() |
10.9 | 54 | "data-xobj-fieldname" : "practiceName", |
![]() |
8.4 | 55 | "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.' |
56 | }) | ||
57 | #createFormElement($practice_name) | ||
![]() |
8.3 | 58 | #set($country = { |
59 | "id" : "country", | ||
60 | "type" : "text", | ||
61 | "required" : "true", | ||
62 | "label" : "Country of practice residence", | ||
63 | "aria-label" : "Choose the country", | ||
64 | "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')", | ||
65 | "data-set-space": "true", | ||
![]() |
8.159 | 66 | "data-space-xobj-classname": "homeopaths.Code.homeopathsCountryClass", |
![]() |
8.9 | 67 | "data-parent-space": "homeopaths", |
![]() |
8.3 | 68 | "data-error-response-type" : "use_label_definite_1", |
69 | "data-auto-first-capital" : "true", | ||
70 | "data-query-type" : "JSON", | ||
71 | "data-query-reference" : "assets.pagemaker.JSON.countries", | ||
72 | "data-query-list-type" : "suggest-select", | ||
73 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
![]() |
8.5 | 74 | "data-query-list-contents" : "key", |
![]() |
8.3 | 75 | "data-query-list-editable" : "false", |
![]() |
8.98 | 76 | "help-block" : 'Input and select the country where your practice resides.' |
![]() |
8.3 | 77 | }) |
78 | #createFormElement($country) | ||
![]() |
2.3 | 79 | #set($address = { |
80 | "id" : "address", | ||
![]() |
8.2 | 81 | "type" : "address", |
![]() |
2.3 | 82 | "required" : "true", |
![]() |
8.149 | 83 | "label" : "Address", |
![]() |
2.3 | 84 | "aria-label" : "Input and select the address of your practice", |
85 | "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')", | ||
86 | "data-error-response-type" : "use_label_definite_1", | ||
87 | "data-auto-first-capital" : "true", | ||
![]() |
4.2 | 88 | "data-query-type" : "address", |
89 | "data-query-reference" : "", | ||
![]() |
2.3 | 90 | "data-query-list-type" : "suggest-select", |
91 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
92 | "data-query-list-contents" : "value/key", | ||
93 | "data-query-list-editable" : "false", | ||
![]() |
10.5 | 94 | "data-create-xobj" : "true", |
95 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
![]() |
8.97 | 96 | "help-block" : 'Input street and number, then select the address of your practice.' |
![]() |
2.3 | 97 | }) |
![]() |
10.5 | 98 | #* |
99 | "data-xobj-fieldname" : "address", | ||
100 | *# | ||
![]() |
2.3 | 101 | #createFormElement($address) |
![]() |
10.2 | 102 | #set($friend = { |
103 | "id" : "friend", | ||
104 | "type" : "hidden", | ||
105 | "value": "$context.getUser()", | ||
106 | "data-create-xobj" : "true", | ||
107 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
108 | "data-xobj-fieldname" : "doc_owner" | ||
109 | }) | ||
![]() |
10.3 | 110 | #createFormElement($friend) |
![]() |
2.3 | 111 | #set($submit = { |
![]() |
8.7 | 112 | "id" : "create_practice", |
113 | "button-text" : "Add practice", | ||
![]() |
2.3 | 114 | "help-block" : "Please remind yourself to always anonymize the case." |
115 | }) | ||
116 | #createSubmit($submit) | ||
117 | #set($form_end = { | ||
118 | "use_captcha": "false" | ||
119 | }) | ||
120 | #createFormEnd($form_end) | ||
![]() |
8.147 | 121 | #end |
![]() |
8.143 | 122 | #end |
![]() |
8.132 | 123 | #end |
![]() |
8.136 | 124 | {{/html}} |
125 | {{/velocity}} |