Changes for page Homeopaths

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

From version 8.140
edited by Jip-jan Alunkel
on December 22, 14:55
Change comment: Renamed from xwiki:practices.WebHome
To version 8.160
edited by Jip-jan Alunkel
on January 31, 17:02
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -8,14 +8,16 @@
8 8  
9 9  {{html wiki="false" clean="false"}}
10 10  <p>
11 -All about homeopaths.
11 +All about the page "homeopaths". Where is it for?
12 12  </p>
13 13  <div id="homeopaths_map"></div>
14 -#set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
15 -#set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
16 -#set($practice_exists = $r.size() > 0)
17 -#if($practice_exists != false && !$isGuest)
18 -
14 +#if(!$isGuest)
15 + #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value)
16 + #if($hasPractice)
17 + #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
18 + #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
19 + #set($practiceExists = $r.size() > 0)
20 + #if(!$practiceExists)
19 19  <h2>Add your practice to the map</h2>
20 20  #set($form_start = {
21 21   "id": "homeoworld_form",
... ... @@ -46,7 +46,6 @@
46 46   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
47 47  })
48 48  #createFormElement($practice_name)
49 -
50 50  #set($country = {
51 51   "id" : "country",
52 52   "type" : "text",
... ... @@ -55,6 +55,7 @@
55 55   "aria-label" : "Choose the country",
56 56   "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')",
57 57   "data-set-space": "true",
59 + "data-space-xobj-classname": "homeopaths.Code.homeopathsCountryClass",
58 58   "data-parent-space": "homeopaths",
59 59   "data-error-response-type" : "use_label_definite_1",
60 60   "data-auto-first-capital" : "true",
... ... @@ -67,12 +67,11 @@
67 67   "help-block" : 'Input and select the country where your practice resides.'
68 68  })
69 69  #createFormElement($country)
70 -
71 71  #set($address = {
72 72   "id" : "address",
73 73   "type" : "address",
74 74   "required" : "true",
75 - "label" : "Address of your practice",
76 + "label" : "Address",
76 76   "aria-label" : "Input and select the address of your practice",
77 77   "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')",
78 78   "data-error-response-type" : "use_label_definite_1",
... ... @@ -99,6 +99,8 @@
99 99   "use_captcha": "false"
100 100  })
101 101  #createFormEnd($form_end)
103 + #end
104 + #end
102 102  #end
103 103  {{/html}}
104 104  {{/velocity}}