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