Skip to content

Commit

Permalink
Merge pull request #2692 from daniel-beck/JENKINS-38175
Browse files Browse the repository at this point in the history
[FIX JENKINS-38175] Fix various ManagementLink related bugs
  • Loading branch information
oleg-nenashev committed Jan 8, 2017
2 parents 7b51d56 + c9b878f commit f7ef77b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion core/src/main/java/jenkins/management/ReloadLink.java
Expand Up @@ -56,5 +56,9 @@ public String getUrlName() {
@Override public boolean getRequiresConfirmation() {
return true;
}


@Override
public boolean getRequiresPOST() {
return true;
}
}
6 changes: 3 additions & 3 deletions core/src/main/resources/jenkins/model/Jenkins/manage.jelly
Expand Up @@ -32,15 +32,15 @@ THE SOFTWARE.
<!-- table to show a map -->
<d:tag name="feature">
<j:set var="iconUrl" value="${icon.startsWith('/') ? resURL+icon : imagesURL+'/48x48/'+icon}"/>
${taskTags!=null and attrs.contextMenu!='false' ? taskTags.add(href,iconUrl,title,requiresConfirmation,requiresConfirmation) : null}
${taskTags!=null and attrs.contextMenu!='false' ? taskTags.add(href,iconUrl,title,post,requiresConfirmation) : null}
<!-- TODO summary.jelly should be modified to accept requiresConfirmation so the icon link can be included -->
<j:set var="_href" value="${href}"/>
<t:summary icon="${icon}"
href="${requiresConfirmation ? null : href}" iconOnly="true">
href="${requiresConfirmation || post ? null : href}" iconOnly="true">
<div class="link">
<j:choose>
<j:when test="${requiresConfirmation}">
<l:confirmationLink href="${_href}" post="true" message="${%are.you.sure(title)}">${title}</l:confirmationLink>
<l:confirmationLink href="${_href}" post="${post}" message="${%are.you.sure(title)}">${title}</l:confirmationLink>
</j:when>
<j:otherwise>
<f:link href="${_href}" post="${post}">${title}</f:link>
Expand Down

0 comments on commit f7ef77b

Please sign in to comment.