Изменения документа AdminFieldsDisplaySheet
Редактировал(а) Dmitriy Rybakov 04.10.2024, 00:09
От версии 1.1
отредактировано Admin xWiKi
на 15.10.2019, 13:19
на 15.10.2019, 13:19
Изменить комментарий:
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/11.8.1]
К версии 2.1
отредактировано Dmitriy Rybakov
на 04.10.2024, 00:09
на 04.10.2024, 00:09
Изменить комментарий:
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/15.10.12]
Сводка
-
Свойства страницы (2 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Автор документа
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.ad min1 +XWiki.rybakovds - Содержимое
-
... ... @@ -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,21 +31,28 @@ 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> 57 + #else 58 + ## We always display a dd element to avoid having a last dt element alone, which would lead to an invalid html. 59 + <dd class="hidden"></dd> 49 49 #end 50 50 #if ($prop.name == 'colorTheme' && $colorThemeHint) 51 51 <dd class="xHint">$colorThemeHint</dd> ... ... @@ -59,6 +59,7 @@ 59 59 ### - $params (mandatory): list of properties to display and their associated sections 60 60 ### - $paramDoc (optional): document object which contains the $paramClass 61 61 ### - $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 62 62 #if ("$!section" != '') 63 63 ## clean="false" due to bug #XWIKI-4122 - the <legend> element is dropped. 64 64 {{html clean="false"}} ... ... @@ -74,14 +74,17 @@ 74 74 #set($configClassName = 'XWiki.XWikiPreferences') 75 75 #set($formId = $section.toLowerCase()) 76 76 #end 77 - <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"> 78 78 #set($obj = $configDoc.getObject($configClassName)) 79 79 #foreach ($entry in $params.entrySet()) 80 80 #set ($fields = $entry.value) 81 - <fieldset class="$entry.key"> 96 + <fieldset class="$escapetool.xml($entry.key)"> 82 82 ## If there is only one section, don't display the legend 83 83 #if ($params.size() > 1) 84 - <legend>$services.localization.render("admin.$entry.key")</legend> 99 + <legend>$escapetool.xml($services.localization.render("admin.$entry.key"))</legend> 85 85 #end 86 86 #if ($fields.size() > 0) 87 87 <dl> ... ... @@ -103,11 +103,15 @@ 103 103 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> 104 104 <input type="hidden" name="xcontinue" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> 105 105 <input type="hidden" name="xredirect" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> 106 - <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 107 107 </div> 108 108 <div class="bottombuttons"> 109 109 <p class="admin-buttons"> 110 - <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> 111 111 </p> 112 112 </div> ## bottombuttons 113 113 </form>