Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: bd79a31592866b9df9d7c34e5c3e51014fb66961 (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-2011 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, Anton Kozak
#        
#
#************************************************************************** --> 
 
 
<?jelly escape-by-default='true'?>
<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>
    Radio button with a label that hides additional controls.
    When checked, those additional controls are displayed. This is useful
    for presenting mutually exclusive options, where each option comes
    with a sub-form that provides additional configuration.
 
    <st:attribute name="name" use="required">
      Name of the radio button group. Radio buttons that are mutually exclusive need
      to have the same name.
    </st:attribute>
    <st:attribute name="value" use="required">
      @value of the &lt;input> element.
    </st:attribute>
    <st:attribute name="title" use="required">
      Human readable label text to be rendered next to the radio button.
    </st:attribute>
    <st:attribute name="checked" use="required" type="boolean">
      Should this control be initially checked or not?
    </st:attribute>
    <st:attribute name="help">
      If specified, the (?) help icon will be rendered on the right,
      for in place help text. See &lt;f:entry> for the details.
    </st:attribute>
    <st:attribute name="isPropertyOverridden">
      if present and true - value is overridden
    </st:attribute>
  </st:documentation>
 
    <j:if test="${attrs.isPropertyOverridden==null}">
        <j:set target="${attrs}" property="isPropertyOverridden" value="false"/>
    </j:if>
    <tr class="radio-block-start" hasHelp="${attrs.help!=null}"><!-- this ID marks the beginning -->
        <td colspan="3" class="${attrs.isPropertyOverridden? 'modified': 'original'}">
            <input type="radio" name="${name}" value="${value}"
                   class="radio-block-control" checked="${checked?'true':null}"/>
            <st:nbsp/>
            <label class="attach-previous">${title}</label>
        </td>
        <j:if test="${attrs.help!=null}">
            <td>
                <a href="#" class="help-button" helpURL="${rootURL}${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="radio-block-end" style="display:none"/>
</j:jelly>

Back to the top