Wiki-Quellcode von Homeopaths

Zuletzt geändert von Jip-jan Alunkel am März 14, 20:13

Verstecke letzte Bearbeiter
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.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())
Jip-jan Alunkel 10.51 19 #set($r = $q.bindValue('usr',"${usrName}").execute())
Jip-jan Alunkel 8.146 20 #set($practiceExists = $r.size() > 0)
21 #if(!$practiceExists)
Jip-jan Alunkel 9.2 22 <h2 id="add_practice">Add your practice to the map</h2>
Jip-jan Alunkel 2.3 23 #set($form_start = {
24 "id": "homeoworld_form",
Jip-jan Alunkel 8.3 25 "product": "practice",
Jip-jan Alunkel 2.3 26 "method": "post",
27 "url": "",
28 "use_captcha": "false"
29 })
30 #createFormStart($form_start)
Jip-jan Alunkel 8.4 31 #set($practice_name = {
Jip-jan Alunkel 10.10 32 "id" : "practiceName",
Jip-jan Alunkel 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",
Jip-jan Alunkel 8.123 42 "data-page-name": "$xcontext.getUserReference().getName()",
Jip-jan Alunkel 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",
Jip-jan Alunkel 10.6 49 "data-create-xobj" : "true",
50 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
Jip-jan Alunkel 10.9 51 "data-xobj-fieldname" : "practiceName",
Jip-jan Alunkel 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)
Jip-jan Alunkel 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",
Jip-jan Alunkel 8.159 63 "data-space-xobj-classname": "homeopaths.Code.homeopathsCountryClass",
Jip-jan Alunkel 8.9 64 "data-parent-space": "homeopaths",
Jip-jan Alunkel 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')",
Jip-jan Alunkel 8.5 71 "data-query-list-contents" : "key",
Jip-jan Alunkel 8.3 72 "data-query-list-editable" : "false",
Jip-jan Alunkel 8.98 73 "help-block" : 'Input and select the country where your practice resides.'
Jip-jan Alunkel 8.3 74 })
75 #createFormElement($country)
Jip-jan Alunkel 2.3 76 #set($address = {
77 "id" : "address",
Jip-jan Alunkel 8.2 78 "type" : "address",
Jip-jan Alunkel 2.3 79 "required" : "true",
Jip-jan Alunkel 8.149 80 "label" : "Address",
Jip-jan Alunkel 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",
Jip-jan Alunkel 4.2 85 "data-query-type" : "address",
86 "data-query-reference" : "",
Jip-jan Alunkel 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",
Jip-jan Alunkel 10.5 91 "data-create-xobj" : "true",
92 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
Jip-jan Alunkel 8.97 93 "help-block" : 'Input street and number, then select the address of your practice.'
Jip-jan Alunkel 2.3 94 })
Jip-jan Alunkel 10.5 95 #*
96 "data-xobj-fieldname" : "address",
97 *#
Jip-jan Alunkel 2.3 98 #createFormElement($address)
Jip-jan Alunkel 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 })
Jip-jan Alunkel 10.3 107 #createFormElement($friend)
Jip-jan Alunkel 2.3 108 #set($submit = {
Jip-jan Alunkel 8.7 109 "id" : "create_practice",
110 "button-text" : "Add practice",
Jip-jan Alunkel 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)
Jip-jan Alunkel 8.147 118 #end
Jip-jan Alunkel 8.143 119 #end
Jip-jan Alunkel 8.132 120 #end
Jip-jan Alunkel 8.136 121 {{/html}}
122 {{/velocity}}