Codice sorgente Wiki di Homeopaths

Version 10.12 by Jip-jan Alunkel on marzo 14, 18:38

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