Skip to content

Commit

Permalink
[JENKINS-60866] Remove stupid attributes from f:toggleSwitch (#6871)
Browse files Browse the repository at this point in the history
[JENKINS-60866] Remove stupid attributes from f:toggleSwitch

Co-authored-by: Daniel Beck <[email protected]>
  • Loading branch information
daniel-beck and daniel-beck authored Jul 21, 2022
1 parent f0f6b1e commit 2e7c5f9
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/src/main/resources/lib/form/toggleSwitch.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,10 @@ THE SOFTWARE.
If this attribute is unspecified or null, it defaults to unchecked, otherwise checked.
</st:attribute>
<st:attribute name="id"/>
<st:attribute name="onclick"/>
<st:attribute name="class"/>
<st:attribute name="invertLabel">
Move the label of the toggle switch to the opposite side
</st:attribute>
<st:attribute name="readonly">
If set to true, this will take precedence over the onclick attribute and prevent the state of the checkbox from
being changed.

Note: if you want an actual read only checkbox then add:
&lt;j:set var="readOnlyMode" value="true"/&gt; inside your entry tag
See https://www.jenkins.io/doc/developer/views/read-only/#enabling-read-only-view-support
</st:attribute>
<st:attribute name="field">
Used for databinding. TBD.
</st:attribute>
Expand All @@ -80,7 +71,6 @@ THE SOFTWARE.
name="${name}"
value="${value}"
id="${id}"
onclick="${readonly=='true' ? 'return false;' : onclick}"
class="jenkins-toggle-switch__input ${attrs.class} ${checkUrl!=null?'validated':''}"
checkUrl="${checkUrl}"
checkDependsOn="${checkDependsOn}" json="${json}"
Expand Down

0 comments on commit 2e7c5f9

Please sign in to comment.