Changes for page Homeopaths

Last modified by Jip-jan Alunkel on March 14, 20:13

From version 8.131
edited by Jip-jan Alunkel
on December 09, 20:23
Change comment: Renamed from xwiki:practices.WebHome
To version 8.149
edited by Jip-jan Alunkel
on January 03, 18:58
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -5,23 +5,18 @@
5 5  #set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
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 -
9 9  {{html wiki="false" clean="false"}}
10 10  <p>
11 11  All about homeopaths.
12 -
13 -#set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
14 -#set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
15 -
16 -#if($r.size() > 0)
17 -Practice page exists.
18 -#else
19 -No practice page.
20 -#end
21 21  </p>
22 22  <div id="homeopaths_map"></div>
23 -
24 -
13 +#if(!$isGuest)
14 + #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value)
15 + #if($hasPractice)
16 + #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
17 + #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
18 + #set($practiceExists = $r.size() > 0)
19 + #if(!$practiceExists)
25 25  <h2>Add your practice to the map</h2>
26 26  #set($form_start = {
27 27   "id": "homeoworld_form",
... ... @@ -52,7 +52,6 @@
52 52   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
53 53  })
54 54  #createFormElement($practice_name)
55 -
56 56  #set($country = {
57 57   "id" : "country",
58 58   "type" : "text",
... ... @@ -73,18 +73,11 @@
73 73   "help-block" : 'Input and select the country where your practice resides.'
74 74  })
75 75  #createFormElement($country)
76 -
77 -#*
78 - "data-create-xobj" : "true",
79 - "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
80 - "data-xobj-fieldname" : "country",
81 -*#
82 -
83 83  #set($address = {
84 84   "id" : "address",
85 85   "type" : "address",
86 86   "required" : "true",
87 - "label" : "Address of your practice",
74 + "label" : "Address",
88 88   "aria-label" : "Input and select the address of your practice",
89 89   "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')",
90 90   "data-error-response-type" : "use_label_definite_1",
... ... @@ -111,4 +111,8 @@
111 111   "use_captcha": "false"
112 112  })
113 113  #createFormEnd($form_end)
114 -
101 + #end
102 + #end
103 +#end
104 +{{/html}}
105 +{{/velocity}}