File tree Expand file tree Collapse file tree 6 files changed +23
-15
lines changed
Expand file tree Collapse file tree 6 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ THE SOFTWARE.
2828 xmlns:i=" jelly:fmt" xmlns : p =" /lib/hudson/project" >
2929 <j : set var =" escapeEntryTitleAndDescription" value =" false" />
3030 <f : entry description =" ${it.formattedDescription}" >
31- <f : checkbox title =" ${h.escape(it.name)}" name =" value" checked =" ${it.value}" readonly = " true " />
31+ <f : checkbox title =" ${h.escape(it.name)}" name =" value" checked =" ${it.value}" />
3232 </f : entry >
3333</j : jelly >
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ THE SOFTWARE.
3535 <l : main-panel >
3636 <t : buildCaption it =" ${build}" >${title}</t : buildCaption >
3737 <j : set var =" escapeEntryTitleAndDescription" value =" true" /> <!-- SECURITY-353 defense unless overridden -->
38+ <j : set var =" readOnlyMode" value =" true" />
3839 <j : forEach var =" parameterValue" items =" ${it.parameters}" >
3940 <st : include it =" ${parameterValue}" page =" value.jelly" />
4041 </j : forEach >
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ THE SOFTWARE.
2424
2525<?jelly escape-by-default =' true' ?>
2626<j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : d =" jelly:define"
27- xmlns:l=" /lib/layout" xmlns : t =" /lib/hudson" xmlns : f =" /lib/form"
28- xmlns:i=" jelly:fmt" xmlns : p =" /lib/hudson/project" >
29- <j : set var =" escapeEntryTitleAndDescription" value =" false" />
30- <f : entry title =" ${h.escape(it.name)}" description =" ${it.formattedDescription}" >
31- <f : textbox name =" value" value =" ${it.value}" readonly = " true " />
32- </f : entry >
27+ xmlns : l =" /lib/layout" xmlns : t =" /lib/hudson" xmlns : f =" /lib/form"
28+ xmlns : i =" jelly:fmt" xmlns : p =" /lib/hudson/project" >
29+ <j : set var =" escapeEntryTitleAndDescription" value =" false" />
30+ <f : entry title =" ${h.escape(it.name)}" description =" ${it.formattedDescription}" >
31+ <f : textbox name =" value" value =" ${it.value}" />
32+ </f : entry >
3333</j : jelly >
Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ THE SOFTWARE.
2626<j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : d =" jelly:define"
2727 xmlns:l=" /lib/layout" xmlns : t =" /lib/hudson" xmlns : f =" /lib/form"
2828 xmlns:i=" jelly:fmt" xmlns : p =" /lib/hudson/project" >
29- <j : set var =" escapeEntryTitleAndDescription" value =" false" />
30- <f : entry title =" ${h.escape(it.name)}" description =" ${it.formattedDescription}" >
31- <f : textarea name =" value" value =" ${it.value}" readonly =" readonly" />
32- </f : entry >
29+ <j : set var =" escapeEntryTitleAndDescription" value =" false" />
30+ <f : entry title =" ${h.escape(it.name)}" description =" ${it.formattedDescription}" >
31+ <j : set var =" readOnlyMode" value =" true" />
32+ <f : textarea name =" value" value =" ${it.value}" />
33+ </f : entry >
3334</j : jelly >
Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ THE SOFTWARE.
8383 name =" ${name}"
8484 value =" ${attrs.value}"
8585 title =" ${attrs.tooltip}"
86- onclick =" ${attrs.readonly=='true' ? 'return false;' : attrs.onclick}" id =" ${attrs.id}" class =" ${attrs.class} ${attrs.negative!=null ? 'negative' : null} ${attrs.checkUrl!=null?'validated':''}"
86+ onclick =" ${attrs.readonly=='true' ? null : attrs.onclick}" id =" ${attrs.id}" class =" ${attrs.class} ${attrs.negative!=null ? 'negative' : null} ${attrs.checkUrl!=null?'validated':''}"
8787 checkUrl =" ${attrs.checkUrl}" checkDependsOn =" ${attrs.checkDependsOn}" json =" ${attrs.json}"
88- disabled =" ${readOnlyMode ? 'true' : null}"
88+ disabled =" ${readOnlyMode or attrs.readonly=='true' ? 'true' : null}"
8989 checked =" ${value ? 'true' : null}" />
9090 <label class =" attach-previous ${attrs.title == null ? 'js-checkbox-label-empty' : ''}"
9191 title =" ${attrs.tooltip}" >${attrs.title}</label >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ THE SOFTWARE.
2424
2525<?jelly escape-by-default =' true' ?>
2626<j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : d =" jelly:define" >
27- <st : documentation > <![CDATA[
27+ <st : documentation > <![CDATA[
2828 <input type="radio"> tag that takes true/false for @checked, which is more Jelly friendly.
2929
3030 Note that Safari doesn't support onchange.
@@ -38,7 +38,13 @@ THE SOFTWARE.
3838 <st : attribute name =" checked" />
3939 <st : attribute name =" value" />
4040 <st : attribute name =" id" />
41- <st : attribute name =" onclick" />
41+ <st : attribute name =" onclick" deprecated =" true" >
42+ Inline JavaScript to execute when the checkbox is clicked.
43+ Deprecated because this attribute is incompatible with adding Content-Security-Policy to the Jenkins UI in the future.
44+ Set 'id' or 'class' attributes as appropriate to look up this element in external Javascript files (e.g. adjuncts)
45+ to add the desired behavior there (DOMContentLoaded event in static forms, Behaviour.specify if this element may be
46+ dynamically added). See https://github.com/jenkinsci/jenkins/pull/6852 for an example.
47+ </st : attribute >
4248 <st : attribute name =" title" >
4349 If specified, this human readable text will follow the radio, and clicking this text also
4450 toggles the radio.
You can’t perform that action at this time.
0 commit comments