Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Tell me more}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
${%blurb(app.rootDir)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Manage}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
${%You have data stored in an older format and/or unreadable data.}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ THE SOFTWARE.
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%More Info}"/>
<l:isAdmin>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</l:isAdmin>
</form>
<div>${%blurb}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ THE SOFTWARE.
<l:isAdmin>
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Create a view now}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
</l:isAdmin>
${%blurb}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
<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">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/disable">
<f:submit value="${%Dismiss}"/>
<f:dismissButton/>
</form>
${%blurb(rootURL)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="learn" value="${%Learn more}"/>
<f:submit name="dismiss" value="${%Dismiss}"/>
<f:dismissButton name="dismiss"/>
</form>
${%blurb}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Manage}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>

${%ExecutorsWarning}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ THE SOFTWARE.
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="agent" value="${%Set up agent}"/>
<f:submit name="cloud" value="${%Set up cloud}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
${%ExecutorsWarning}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<l:isAdmin>
<form method="post" action="${rootURL}/${it.url}/disable">
<f:submit value="${%Dismiss}"/>
<f:dismissButton/>
</form>
</l:isAdmin>
<j:set var="actionAnchor">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Setup Security}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
${%blurb}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Apply Migration}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
${%blurb}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Disable automatic generation of legacy API tokens}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
${%warningMessage}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Prevent users from manually creating legacy API tokens}"/>
<f:submit name="no" value="${%Dismiss}"/>
<f:dismissButton name="no"/>
</form>
${%warningMessage}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
<div class="jenkins-alert jenkins-alert-info">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="more" value="${%Learn more}"/>
<f:submit name="dismiss" primary="false" value="${%Dismiss}"/>
<f:dismissButton name="dismiss"/>
</form>
${%blurb}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/disable">
<f:submit value="${%Dismiss}"/>
<f:dismissButton/>
</form>
<j:set var="referenceAnchor">
<a href="https://www.jenkins.io/redirect/csrf-protection" rel="noopener noreferrer" target="_blank">${%referenceUrlContent}</a>
Expand Down
50 changes: 50 additions & 0 deletions core/src/main/resources/lib/form/dismissButton.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
The MIT License

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<st:documentation> <![CDATA[
Icon-based dismiss button for administrative monitors.
Uses symbol-close icon for visual consistency with other Jenkins UI elements.
]]>
<st:attribute name="name" use="optional">
Name attribute for the submit button (e.g., "no", "dismiss").
If not specified, the button will submit without a name attribute.
</st:attribute>
</st:documentation>

<j:set var="buttonName" value="${attrs.name}" />
<j:choose>
<j:when test="${buttonName != null}">
<button type="submit" name="${buttonName}" class="jenkins-button jenkins-button--tertiary" tooltip="${%Dismiss}">
<l:icon src="symbol-close" />
</button>
</j:when>
<j:otherwise>
<button type="submit" class="jenkins-button jenkins-button--tertiary" tooltip="${%Dismiss}">
<l:icon src="symbol-close" />
</button>
</j:otherwise>
</j:choose>
</j:jelly>
23 changes: 23 additions & 0 deletions core/src/main/resources/lib/form/dismissButton.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The MIT License
#
# Copyright (c) 2024
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Dismiss=Dismiss
Loading