Código fuente wiki de Homeopaths

Versión 10.14 por Jip-jan Alunkel el marzo 14, 18:41

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