Wiki source code of MoccaCalendarSheet
Last modified by Andrey Che on 2018/12/10 14:09
Show last authors
1 | {{velocity}} |
2 | ## pretty desparate measure to avoid edit form mess when embedded into another document, which in turn gets edited |
3 | #set($myEdit = ($xcontext.action == 'edit') && ($doc.getURL("edit") == $xcontext.getRequest().getRequestURI()) ) |
4 | #if(($xcontext.action == 'edit') && !$myEdit) |
5 | #set($oldView = $xcontext.get('display')) |
6 | #set($discard = $xcontext.put('display','view')) |
7 | #end |
8 | {{html wiki="true"}} |
9 | #set ($discard = $xwiki.jsfx.use('uicomponents/widgets/colorpicker/procolor.js', true)) |
10 | #set ($discard = $xwiki.jsx.use("ColorThemes.ColorThemeSheet", {'defer': false})) |
11 | #set ($discard = $xwiki.ssx.use("ColorThemes.ColorThemeSheet")) |
12 | #set ($discard = $doc.use('MoccaCalendar.MoccaCalendarClass')) |
13 | #set($discard = $xwiki.jsx.use("MoccaCalendar.MoccaCalendarSheet")) |
14 | (% class="xform" %) |
15 | ((( |
16 | ; <label for="MoccaCalendar.MoccaCalendarClass_0_title">$escapetool.xml($doc.displayPrettyName('title', false, false))</label> |
17 | : $doc.display('title') |
18 | #if($myEdit) |
19 | ; <label for="MoccaCalendar.MoccaCalendarClass_0_color">$escapetool.xml($doc.displayPrettyName('color', false, false))</label> |
20 | : <input class="procolor" name="MoccaCalendar.MoccaCalendarClass_0_color" size="30" type="text" value="$escapetool.html($doc.getValue('color'))"/> |
21 | #end |
22 | ; <label for="MoccaCalendar.MoccaCalendarClass_0_description">$escapetool.xml($doc.displayPrettyName('description', false, false))</label> |
23 | : $doc.display('description') |
24 | #if(!${myEdit}) |
25 | ; <label for="MoccaCalendar.MoccaCalendarClass_0_content1">$escapetool.xml($doc.displayPrettyName('content1', false, false))</label> |
26 | : $doc.display('content1') |
27 | #end |
28 | ))) |
29 | |
30 | #if(!${myEdit}) |
31 | #if($oldView) |
32 | #set($discard = $xcontext.put('display',$oldView)) |
33 | #end |
34 | #end |
35 | {{/html}} |
36 | #set($docextras=[]) |
37 | {{/velocity}} |