Código fuente wiki de Homeopaths

Versión 10.13 por Jip-jan Alunkel el marzo 14, 18:39

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