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