Modifications pour le document AdminFieldsDisplaySheet
Modifié par Florent Charton le 2024/08/08 18:43
Depuis la version 1.1
modifié par superadmin
sur 2022/06/20 08:48
sur 2022/06/20 08:48
Commentaire de modification :
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/13.10.6]
À la version 2.1
modifié par Florent Charton
sur 2024/08/08 18:43
sur 2024/08/08 18:43
Commentaire de modification :
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/15.10.11]
Résumé
-
Propriétés de la Page (2 modifications, 0 ajouts, 0 suppressions)
Détails
- Propriétés de la Page
-
- Auteur du document
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. superadmin1 +xwiki:XWiki.fcharton - Contenu
-
... ... @@ -19,10 +19,14 @@ 19 19 $out ## 20 20 #set ($out = '') 21 21 #end 22 - $title 22 + $escapetool.xml($title) 23 23 #if ($prop.name == 'skin') 24 24 #set ($skin = $xwiki.skin) 25 - <span class="buttonwrapper"><a href="$xwiki.getURL($skin, 'edit')"#if ($skin.indexOf('.') < 0) class="hidden"#end>$services.localization.render('admin.customize')</a></span> 25 + <span class="buttonwrapper"> 26 + <a href="$xwiki.getURL($skin, 'edit')"#if ($skin.indexOf('.') < 0) class="hidden"#end> 27 + $escapetool.xml($services.localization.render('admin.customize')) 28 + </a> 29 + </span> 26 26 #end 27 27 #if ($prop.name == 'colorTheme') 28 28 #if ($editor == 'globaladmin') ... ... @@ -31,18 +31,22 @@ 31 31 #set ($colorThemeName = $xwiki.getSpacePreference('colorTheme')) 32 32 #set ($wikiColorTheme = $xwiki.getDocument($xwiki.getXWikiPreference('colorTheme'))) 33 33 #if (!$wikiColorTheme.isNew()) 34 - #set ($colorThemeHint = $services.localization.render('admin.colortheme.wikiSetting', ["<a href='$wikiColorTheme.getURL()'>$wikiColorTheme.plainTitle</a>" ]))38 + #set ($colorThemeHint = $escapetool.xml($services.localization.render('admin.colortheme.wikiSetting', ['__LINK__'])).replaceAll('__LINK__', "<a href='$wikiColorTheme.getURL()'>$wikiColorTheme.plainTitle</a>")) 35 35 #end 36 36 #end 37 37 #if ($xwiki.exists($services.model.createDocumentReference('', 'FlamingoThemes', 'WebHome'))) 38 - #set ($colorThemeHint = "$!{colorThemeHint} <strong><a href=""$xwiki.getURL($services.model.createDocumentReference('', 'FlamingoThemes', 'WebHome'))"">$services.localization.render('admin.colortheme.manage')</a></strong>") 42 + #set ($colorThemeHint = "$!{colorThemeHint} <strong><a href=""$xwiki.getURL($services.model.createDocumentReference('', 'FlamingoThemes', 'WebHome'))"">$escapetool.xml($services.localization.render('admin.colortheme.manage'))</a></strong>") 39 39 #elseif ($xwiki.exists($services.model.createDocumentReference('', 'ColorThemes', 'WebHome'))) 40 - #set ($colorThemeHint = "$!{colorThemeHint} <strong><a href=""$xwiki.getURL($services.model.createDocumentReference('', 'ColorThemes', 'WebHome'))"">$services.localization.render('admin.colortheme.manage')</a></strong>") 44 + #set ($colorThemeHint = "$!{colorThemeHint} <strong><a href=""$xwiki.getURL($services.model.createDocumentReference('', 'ColorThemes', 'WebHome'))"">$escapetool.xml($services.localization.render('admin.colortheme.manage'))</a></strong>") 41 41 #end 42 - <span class="buttonwrapper"><a href="$xwiki.getURL($colorThemeName, 'edit')"#if ($colorThemeName.indexOf('.') < 0) class="hidden"#end>$services.localization.render('admin.customize')</a></span> 46 + <span class="buttonwrapper"> 47 + <a href="$xwiki.getURL($colorThemeName, 'edit')"#if ($colorThemeName.indexOf('.') < 0) class="hidden"#end> 48 + $escapetool.xml($services.localization.render('admin.customize')) 49 + </a> 50 + </span> 43 43 #end 44 44 </label> 45 - #if ($hint)<span class="xHint">$hint</span>#end 53 + #if ($hint)<span class="xHint">$escapetool.xml($hint)</span>#end 46 46 </dt> 47 47 #if ($out != '') 48 48 <dd>$out</dd> ... ... @@ -62,6 +62,7 @@ 62 62 ### - $params (mandatory): list of properties to display and their associated sections 63 63 ### - $paramDoc (optional): document object which contains the $paramClass 64 64 ### - $paramClass (optional): name of the xclass type for the xobject from which to read/save from 73 +### - $objectPolicy (since 14.10) (optional): the update policy to use when saving the form 65 65 #if ("$!section" != '') 66 66 ## clean="false" due to bug #XWIKI-4122 - the <legend> element is dropped. 67 67 {{html clean="false"}} ... ... @@ -77,14 +77,17 @@ 77 77 #set($configClassName = 'XWiki.XWikiPreferences') 78 78 #set($formId = $section.toLowerCase()) 79 79 #end 80 - <form id="$formId" method="post" action="$xwiki.getURL($configDoc, 'saveandcontinue')" onsubmit="cancelCancelEdit()" class="xform"> 89 + <form id="$escapetool.xml($formId)" method="post" 90 + action="$escapetool.xml($xwiki.getURL($configDoc, 'saveandcontinue'))" 91 + onsubmit="cancelCancelEdit()" 92 + class="xform"> 81 81 #set($obj = $configDoc.getObject($configClassName)) 82 82 #foreach ($entry in $params.entrySet()) 83 83 #set ($fields = $entry.value) 84 - <fieldset class="$entry.key"> 96 + <fieldset class="$escapetool.xml($entry.key)"> 85 85 ## If there is only one section, don't display the legend 86 86 #if ($params.size() > 1) 87 - <legend>$services.localization.render("admin.$entry.key")</legend> 99 + <legend>$escapetool.xml($services.localization.render("admin.$entry.key"))</legend> 88 88 #end 89 89 #if ($fields.size() > 0) 90 90 <dl> ... ... @@ -106,11 +106,15 @@ 106 106 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> 107 107 <input type="hidden" name="xcontinue" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> 108 108 <input type="hidden" name="xredirect" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> 109 - <input type="hidden" name="classname" value="$configClassName" /> 121 + <input type="hidden" name="classname" value="$escapetool.xml($configClassName)" /> 122 + #if ("$!objectPolicy" != '') 123 + <input type="hidden" name="objectPolicy" value="$escapetool.xml($objectPolicy)" /> 124 + #end 110 110 </div> 111 111 <div class="bottombuttons"> 112 112 <p class="admin-buttons"> 113 - <span class="buttonwrapper"><input class="button" type="submit" name="formactionsac" value="$services.localization.render('admin.save')" /></span> 128 + <span class="buttonwrapper"><input class="button" type="submit" name="formactionsac" 129 + value="$escapetool.xml($services.localization.render('admin.save'))" /></span> 114 114 </p> 115 115 </div> ## bottombuttons 116 116 </form>