Changes for page Homeopaths
Last modified by Jip-jan Alunkel on March 14, 20:13
From version 8.137
edited by Jip-jan Alunkel
on December 22, 14:37
on December 22, 14:37
Change comment:
Renamed from xwiki:practices.WebHome
To version 8.149
edited by Jip-jan Alunkel
on January 03, 18:58
on January 03, 18:58
Change comment:
Renamed from xwiki:practices.WebHome
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,23 +4,22 @@ 1 - 2 -{{velocity}} 3 - 4 4 {{include reference="assets.pagemaker.macros"/}} 5 5 3 +{{velocity}} 6 6 #set($discard = $services.localization.use('document', 'homeopaths.Code.translations')) 7 7 #set($discard = $services.localization.use('document', 'assets.pagemaker.translations')) 8 8 #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false})) 9 9 #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false})) 10 - 11 11 {{html wiki="false" clean="false"}} 12 12 <p> 13 13 All about homeopaths. 14 14 </p> 15 15 <div id="homeopaths_map"></div> 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($practice_exists = $r.size() > 0) 19 -#if($practice_exists != false) 20 - 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) 21 21 <h2>Add your practice to the map</h2> 22 22 #set($form_start = { 23 23 "id": "homeoworld_form", ... ... @@ -48,7 +48,6 @@ 48 48 "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.' 49 49 }) 50 50 #createFormElement($practice_name) 51 - 52 52 #set($country = { 53 53 "id" : "country", 54 54 "type" : "text", ... ... @@ -69,12 +69,11 @@ 69 69 "help-block" : 'Input and select the country where your practice resides.' 70 70 }) 71 71 #createFormElement($country) 72 - 73 73 #set($address = { 74 74 "id" : "address", 75 75 "type" : "address", 76 76 "required" : "true", 77 - "label" : "Address of your practice",74 + "label" : "Address", 78 78 "aria-label" : "Input and select the address of your practice", 79 79 "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')", 80 80 "data-error-response-type" : "use_label_definite_1", ... ... @@ -101,6 +101,8 @@ 101 101 "use_captcha": "false" 102 102 }) 103 103 #createFormEnd($form_end) 101 + #end 102 + #end 104 104 #end 105 105 {{/html}} 106 106 {{/velocity}}