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