Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: fc2e7e4cff097d9d5d1095b7292c1f6cc1d2cc60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!-- **************************************************************************
#
# Copyright  (c) 2004-2009 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#    Kohsuke Kawaguchi
#        
#
#************************************************************************** --> 


<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
  <st:documentation>
    Foldable block that can be expanded to show more controls by checking the checkbox.

    <st:attribute name="name">
      Name of the checkbox. Can be used by the server to determine
      if the block is collapsed or expanded at the time of submission.

      Note that when the block is collapsed, none of its child controls will send
      the values to the server (unlike &lt;f:advanced>)
    </st:attribute>
    <st:attribute name="title">
      Human readable text that follows the checkbox.
    </st:attribute>
    <st:attribute name="field">
      Used for databinding. TBD. Either this or @name/@title combo is required.
    </st:attribute>
    <st:attribute name="checked">
      initial checkbox status. true/false.
    </st:attribute>
    <st:attribute name="help">
      If present, the (?) icon will be rendered on the right to show inline help.
      See @help for &lt;f:entry>.
    </st:attribute>
    <st:attribute name="negative">
      if present, the foldable section expands when the checkbox is unchecked.
    </st:attribute>
    <st:attribute name="inline">
      if present, the foldable section will not be grouped into a separate JSON object upon submission
    </st:attribute>
  </st:documentation>
  <j:if test="${attrs.help==null}">
    <!-- infer the help page from the current descriptor and field if possible -->
    <j:set target="${attrs}" property="help"
           value="${descriptor.getHelpFile(attrs.field)}" />
  </j:if>

  <tr class="optional-block-start ${attrs.inline?'':'row-set-start'}" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
    <td colspan="3">
      <f:checkbox name="${attrs.name}" onclick="javascript:updateOptionalBlock(this,true)"
                  negative="${attrs.negative}" checked="${attrs.checked}" field="${attrs.field}" title="${title}" />
    </td>
    <j:if test="${attrs.help!=null}">
      <td>
        <a href="#" class="help-button" helpURL="${rootURL}${attrs.help}"><img src="${imagesURL}/16x16/help.png" alt="Help for feature: ${title}" /></a>
      </td>
    </j:if>
  </tr>
  <j:if test="${attrs.help!=null}">
    <f:helpArea />
  </j:if>
  <d:invokeBody />
  <!-- end marker -->
  <tr class="${attrs.inline?'':'row-set-end'} optional-block-end" />
</j:jelly>

Back to the top