Changes for page homeopathsSheet
Last modified by Jip-jan Alunkel on March 26, 17:31
From version 1.8
edited by Jip-jan Alunkel
on March 07, 13:37
on March 07, 13:37
Change comment:
There is no comment for this version
To version 1.4
edited by Jip-jan Alunkel
on March 05, 20:14
on March 05, 20:14
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -5,20 +5,17 @@ 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, 'language': $context.language, 'myParameter': 'value'})) 8 -#set($t heDoc = $xwiki.getDocument("${doc.fullName}").getTranslatedDocument())8 +#set($countrydoc = $xwiki.getDocument("${doc.fullName}").getTranslatedDocument()) 9 9 #set($isInline = $xcontext.action == 'edit' && $request.get('editor') == 'inline') 10 -## Create object (important for sheet binding, do not remove) 11 -#set($theDocObj = $doc.getObject("homeopaths.Code.homeopathsClass", true)) 12 -#set($hasRight = !$isGuest && ($theDocObj.getProperty('user').value == $context.getUser() || $hasAdmin)) 13 -$theDoc.getContent() 10 +$countrydoc.getContent() 14 14 15 15 {{html wiki="true" clean="false"}} 16 -#if(!$isGuest) 13 + #if(!$isGuest) 17 17 <script> 18 18 var pagemakerOffspring = "disable"; 19 19 </script> 20 -#end 21 -#if($ hasRight)17 + #end 18 + #if(!$isGuest) 22 22 <p class="buttons text-align-right"> 23 23 <a class="btn btn-primary" title="Edit" href="$doc.getURL("edit")?editor=wysiwyg" role="button" rel="nofollow"> 24 24 <span class="fa fa-pencil"></span> ... ... @@ -25,10 +25,12 @@ 25 25 <span class="btn-label">Edit contents</span> 26 26 </a> 27 27 </p> 28 -#end 25 + #end 29 29 #set($spaceReference = $services.model.resolveDocument('', 'default', $doc.documentReference.lastSpaceReference).parent) 30 30 #set($spaceTitle = $spaceReference.getName()) 31 31 <div class="clearfix"></div> 29 +## Get/Create object (important for sheet binding, do not remove) 30 +#set($countryObj = $doc.getObject("homeopaths.Code.homeopathsCountryClass", true)) 32 32 #if($xcontext.action == "view") 33 33 <div id="${spaceTitle}" class="box sheet_properties"> 34 34 <h2>Details</h2> ... ... @@ -40,7 +40,7 @@ 40 40 Countries over the world have different rules regarding the neccessity of a medical degree to practice homeopathy. 41 41 </p> 42 42 </div> 43 - #if($ hasRight)42 + #if(!$isGuest) 44 44 <p class="buttons text-align-right"> 45 45 <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow"> 46 46 <span class="btn-label">Edit details</span> ... ... @@ -48,23 +48,23 @@ 48 48 </p> 49 49 #end 50 50 </div> 51 - #if($ hasRight) ## Ook de rechtssituatieuitlezen en meenemen.50 + #if(!$isGuest) 52 52 #set($form_start = { 53 - "id": "homeopaths_form", 54 - "product": " homeopathdetails",52 + "id": "homeopathsCountry_form", 53 + "product": "country details", 55 55 "method": "post", 56 56 "url": "", 57 57 "use_captcha": "false" 58 58 }) 59 - #set($c ity= {60 - "id": "c ity",61 - "type": " text",58 + #set($non_free_occupation = { 59 + "id": "non_free_occupation", 60 + "type": "checkbox", 62 62 "required" : "false", 63 - "label" : " City",62 + "label" : "Medical degree mandatory", 64 64 "data-create-xobj" : "true", 65 - "data-xobj-classname" : "homeopaths.Code.homeopathsClass", 66 - "data-xobj-fieldname" : "c ity",67 - "value": "$ theDocObj.getProperty('city').value"64 + "data-xobj-classname" : "homeopaths.Code.homeopathsCountryClass", 65 + "data-xobj-fieldname" : "non_free_occupation", 66 + "value": "$doc.getObject('homeopaths.Code.homeopathsCountryClass').getProperty('non_free_occupation').value" 68 68 }) 69 69 #set($submit = { 70 70 "id" : "edit_details", ... ... @@ -86,7 +86,7 @@ 86 86 </button> 87 87 </div> 88 88 <div class="modal-body"> 89 - #createFormElement($c ity)88 + #createFormElement($non_free_occupation) 90 90 </div> 91 91 <div class="modal-footer"> 92 92 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> ... ... @@ -97,8 +97,6 @@ 97 97 </div> 98 98 </div> 99 99 #end 100 -#else 101 - This page can not be viewed in inline mode. 102 102 #end 103 103 {{/html}} 104 104 {{/velocity}}