Changes for page Homeopaths

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

From version 10.10
edited by Jip-jan Alunkel
on March 14, 18:32
Change comment: Renamed from xwiki:practices.WebHome
To version 9.1
edited by Jip-jan Alunkel
on February 10, 17:51
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -14,11 +14,11 @@
14 14  #if(!$isGuest)
15 15   #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value)
16 16   #if($hasPractice)
17 - #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.object(homeopaths.Code.homeopathsClass).doc_owner like :usr"))
17 + #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
18 18   #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
19 19   #set($practiceExists = $r.size() > 0)
20 20   #if(!$practiceExists)
21 -<h2 id="add_practice">Add your practice to the map</h2>
21 +<h2>Add your practice to the map</h2>
22 22  #set($form_start = {
23 23   "id": "homeoworld_form",
24 24   "product": "practice",
... ... @@ -28,7 +28,7 @@
28 28  })
29 29  #createFormStart($form_start)
30 30  #set($practice_name = {
31 - "id" : "practiceName",
31 + "id" : "practice_name",
32 32   "type" : "text",
33 33   "required" : "true",
34 34   "label" : "Name of your practice",
... ... @@ -45,9 +45,6 @@
45 45   "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')",
46 46   "data-query-list-contents" : "value",
47 47   "data-create-page" : "true",
48 - "data-create-xobj" : "true",
49 - "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
50 - "data-xobj-fieldname" : "practiceName",
51 51   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
52 52  })
53 53  #createFormElement($practice_name)
... ... @@ -89,21 +89,10 @@
89 89   "data-query-list-editable" : "false",
90 90   "data-create-xobj" : "true",
91 91   "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
89 + "data-xobj-fieldname" : "address",
92 92   "help-block" : 'Input street and number, then select the address of your practice.'
93 93  })
94 -#*
95 - "data-xobj-fieldname" : "address",
96 -*#
97 97  #createFormElement($address)
98 -#set($friend = {
99 - "id" : "friend",
100 - "type" : "hidden",
101 - "value": "$context.getUser()",
102 - "data-create-xobj" : "true",
103 - "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
104 - "data-xobj-fieldname" : "doc_owner"
105 -})
106 -#createFormElement($friend)
107 107  #set($submit = {
108 108   "id" : "create_practice",
109 109   "button-text" : "Add practice",