Changes for page Homeopaths

Last modified by Jip-jan Alunkel on May 06, 23:58

From version 8.2
edited by Jip-jan Alunkel
on December 03, 13:04
Change comment: Renamed from xwiki:practices.WebHome
To version 8.26
edited by Jip-jan Alunkel
on December 08, 13:34
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -6,16 +6,91 @@
6 6  #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false}))
7 7  #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false}))
8 8  
9 -{{html wiki="true" clean="false"}}
9 +{{html wiki="false" clean="false"}}
10 +<p>
11 +All about homeopaths.
12 +</p>
13 +<div id="homeopaths_map"></div>
14 +
15 +<script>
16 + var map = L.map('homeopaths_map').setView([18, 10], 2);
17 + L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
18 + maxZoom: 19,
19 + attribution: ''
20 + }).addTo(map);
21 + map.attributionControl.setPrefix('');
22 + var markers = [
23 + [ -0.1244324, 51.5006728, "Big Ben" ],
24 + [ -0.119623, 51.503308, "London Eye" ],
25 + [ -0.1279688, 51.5077286, "Nelson's Column<br><a href=\"https://en.wikipedia.org/wiki/Nelson's_Column\">wp</a>" ]
26 + ];
27 + for (var i=0; i<markers.length; i++) {
28 + let lon = markers[i][0],
29 + lat = markers[i][1],
30 + popupText = markers[i][2],
31 + markerLocation = new L.LatLng(lat, lon),
32 + marker = new L.Marker(markerLocation);
33 + map.addLayer(marker);
34 + marker.bindPopup(popupText);
35 + }
36 +</script>
37 +<h2>Add your practice to the map</h2>
10 10  #set($form_start = {
11 11   "id": "homeoworld_form",
12 - "product": "case",
40 + "product": "practice",
13 13   "method": "post",
14 14   "url": "",
15 15   "use_captcha": "false"
16 16  })
17 17  #createFormStart($form_start)
46 +#set($practice_name = {
47 + "id" : "practice_name",
48 + "type" : "text",
49 + "required" : "true",
50 + "label" : "Name of your practice",
51 + "aria-label" : "Enter the name of your practice",
52 + "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')",
53 + "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$",
54 + "data-error-response-type" : "use_label_definite_1",
55 + "data-auto-first-capital" : "true",
56 + "data-query-type" : "XWQL",
57 + "data-query-reference" : "assets.pagemaker.XWQL.matchTitle",
58 + "data-query-scope" : "homeopaths",
59 + "data-query-list-type" : "suggest-negate",
60 + "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')",
61 + "data-query-list-contents" : "value",
62 + "data-create-page" : "true",
63 + "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
64 +})
65 +#createFormElement($practice_name)
18 18  
67 +#set($country = {
68 + "id" : "country",
69 + "type" : "text",
70 + "required" : "true",
71 + "label" : "Country of practice residence",
72 + "aria-label" : "Choose the country",
73 + "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')",
74 + "data-set-space": "true",
75 + "data-parent-space": "homeopaths",
76 + "data-error-response-type" : "use_label_definite_1",
77 + "data-auto-first-capital" : "true",
78 + "data-query-type" : "JSON",
79 + "data-query-reference" : "assets.pagemaker.JSON.countries",
80 + "data-query-list-type" : "suggest-select",
81 + "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')",
82 + "data-query-list-contents" : "key",
83 + "data-query-list-editable" : "false",
84 + "help-block" : 'Type and select the country where your practice resides.'
85 +})
86 +#createFormElement($country)
87 +
88 +#*
89 + "data-create-xobj" : "true",
90 + "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
91 + "data-xobj-fieldname" : "country",
92 +*#
93 +
19 19  #set($address = {
20 20   "id" : "address",
21 21   "type" : "address",
... ... @@ -38,8 +38,8 @@
38 38  })
39 39  #createFormElement($address)
40 40  #set($submit = {
41 - "id" : "create_case",
42 - "button-text" : "Submit",
116 + "id" : "create_practice",
117 + "button-text" : "Add practice",
43 43   "help-block" : "Please remind yourself to always anonymize the case."
44 44  })
45 45  #createSubmit($submit)
XWiki.JavaScriptExtension[0]
Caching policy
... ... @@ -1,0 +1,1 @@
1 +forbid
Code
... ... @@ -1,0 +1,21 @@
1 + var map = L.map('homeopaths_map').setView([18, 10], 2);
2 + L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
3 + maxZoom: 19,
4 + attribution: ''
5 + }).addTo(map);
6 + map.attributionControl.setPrefix('');
7 + var markers = [
8 + [ -0.1244324, 51.5006728, "Big Ben" ],
9 + [ -0.119623, 51.503308, "London Eye" ],
10 + [ -0.1279688, 51.5077286, "Nelson's Column<br><a href=\"https://en.wikipedia.org/wiki/Nelson's_Column\">wp</a>" ]
11 + ];
12 + for (var i=0; i<markers.length; i++) {
13 + let lon = markers[i][0],
14 + lat = markers[i][1],
15 + popupText = markers[i][2],
16 + markerLocation = new L.LatLng(lat, lon),
17 + marker = new L.Marker(markerLocation);
18 + map.addLayer(marker);
19 + marker.bindPopup(popupText);
20 + }
21 +
Parse content
... ... @@ -1,0 +1,1 @@
1 +Yes
Use this extension
... ... @@ -1,0 +1,1 @@
1 +currentPage
XWiki.StyleSheetExtension[0]
Caching policy
... ... @@ -1,0 +1,1 @@
1 +long