Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -32,7 +32,7 @@ dl {
l.isAdmin() {
form(method: "post", action: "${rootURL}/${my.url}/act") {
f.submit(name: 'redirect', value: _("Configure resource root URL"))
f.submit(name: 'dismiss', value: _("Dismiss"))
f.dismissButton(name: 'dismiss')
}
}

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
45 changes: 45 additions & 0 deletions core/src/main/resources/lib/form/dismissButton.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--
The MIT License

Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Yahoo! Inc.

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:s="jelly:stapler">
<s:documentation> <![CDATA[
Dismiss button with red cross icon. Used in administrative monitor alerts.
]]>
<s:attribute name="name">
If specified, becomes the value of the name attribute.
When you have more than one submit button on the form, this can be used to determine
which button is pressed, as the server will get a parameter by this name.
Defaults to 'Submit'.
</s:attribute>
<s:attribute name="value">
The value attribute of the button, defaults to localized 'Dismiss' text.
</s:attribute>
</s:documentation>

<button name="${attrs.name ?: 'Submit'}" value="${attrs.value ?: '%Dismiss'}" formNoValidate="formNoValidate" class="jenkins-button jenkins-submit-button" style="padding: 0; width: 38px; height: 38px; border-radius: 100%; background: transparent;">
<span class="jenkins-visually-hidden">${attrs.value ?: '%Dismiss'}</span>
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512" style="width: 1.125rem; height: 1.125rem;"><path fill="none" stroke="#e53935" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>
</button>
</j:jelly>
Loading