Wiki source code of homeopathsSheet

Version 1.10 by Jip-jan Alunkel on March 07, 14:56

Hide last authors
Jip-jan Alunkel 1.1 1 {{include reference="assets.pagemaker.macros"/}}
2
3 {{velocity}}
4 #set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
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, 'language': $context.language, 'myParameter': 'value'}))
Jip-jan Alunkel 1.5 8 #set($theDoc = $xwiki.getDocument("${doc.fullName}").getTranslatedDocument())
Jip-jan Alunkel 1.1 9 #set($isInline = $xcontext.action == 'edit' && $request.get('editor') == 'inline')
Jip-jan Alunkel 1.5 10 ## Create object (important for sheet binding, do not remove)
11 #set($theDocObj = $doc.getObject("homeopaths.Code.homeopathsClass", true))
Jip-jan Alunkel 1.7 12 #set($hasRight = !$isGuest && ($theDocObj.getProperty('user').value == $context.getUser() || $hasAdmin))
Jip-jan Alunkel 1.5 13 $theDoc.getContent()
Jip-jan Alunkel 1.4 14 {{html wiki="true" clean="false"}}
Jip-jan Alunkel 1.7 15 #if(!$isGuest)
Jip-jan Alunkel 1.4 16 <script>
17 var pagemakerOffspring = "disable";
18 </script>
Jip-jan Alunkel 1.7 19 #end
20 #if($hasRight)
Jip-jan Alunkel 1.1 21 <p class="buttons text-align-right">
22 <a class="btn btn-primary" title="Edit" href="$doc.getURL("edit")?editor=wysiwyg" role="button" rel="nofollow">
23 <span class="fa fa-pencil"></span>
24 <span class="btn-label">Edit contents</span>
25 </a>
26 </p>
Jip-jan Alunkel 1.7 27 #end
Jip-jan Alunkel 1.1 28 #set($spaceReference = $services.model.resolveDocument('', 'default', $doc.documentReference.lastSpaceReference).parent)
29 #set($spaceTitle = $spaceReference.getName())
30 <div class="clearfix"></div>
31 #if($xcontext.action == "view")
32 <div id="${spaceTitle}" class="box sheet_properties">
33 <h2>Details</h2>
34 <div id="non_free_occupation">
35 <p class="property">
36 <span class="property-name">Medical degree mandatory</span> <span class="property-value">$doc.display('non_free_occupation')</span>
37 </p>
38 <p class="help-block">
39 Countries over the world have different rules regarding the neccessity of a medical degree to practice homeopathy.
40 </p>
41 </div>
Jip-jan Alunkel 1.7 42 #if($hasRight)
Jip-jan Alunkel 1.1 43 <p class="buttons text-align-right">
44 <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow">
45 <span class="btn-label">Edit details</span>
46 </a>
47 </p>
48 #end
49 </div>
Jip-jan Alunkel 1.7 50 #if($hasRight) ## Ook de rechts situatie uitlezen en meenemen.
Jip-jan Alunkel 1.1 51 #set($form_start = {
Jip-jan Alunkel 1.5 52 "id": "homeopaths_form",
53 "product": "homeopath details",
Jip-jan Alunkel 1.1 54 "method": "post",
55 "url": "",
56 "use_captcha": "false"
57 })
Jip-jan Alunkel 1.5 58 #set($city = {
59 "id": "city",
60 "type": "text",
Jip-jan Alunkel 1.1 61 "required" : "false",
Jip-jan Alunkel 1.5 62 "label" : "City",
Jip-jan Alunkel 1.1 63 "data-create-xobj" : "true",
Jip-jan Alunkel 1.5 64 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
Jip-jan Alunkel 1.10 65 "data-xobj-fieldname" : "pmCity",
66 "value": "$theDocObj.getProperty('pmCity').value"
67 })
68 #set($submit = {
69 "id" : "edit_details",
70 "button-text" : "Save changes",
71 "clean": "true",
72 "help-block" : ""
73 })
74 #set($form_end = {
75 "use_captcha": "false"
76 })
77 <div class="modal fade" id="detailsModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
78 <div class="modal-dialog modal-dialog-centered" role="document">
79 <div class="modal-content">
80 #createFormStart($form_start)
81 <div class="modal-header">
82 <h3 class="modal-title">Details</h3>
83 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
84 <span aria-hidden="true">&times;</span>
85 </button>
86 </div>
87 <div class="modal-body">
Jip-jan Alunkel 1.5 88 #createFormElement($city)
Jip-jan Alunkel 1.1 89 </div>
90 <div class="modal-footer">
91 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
92 #createSubmit($submit)
93 </div>
94 #createFormEnd($form_end)
95 </div>
96 </div>
97 </div>
98 #end
Jip-jan Alunkel 1.7 99 #else
100 This page can not be viewed in inline mode.
Jip-jan Alunkel 1.1 101 #end
102 {{/html}}
103 {{/velocity}}