Skip to content

Commit

Permalink
[JENKINS-71025] Remove inline JS from configure-common (jenkinsci#8866)
Browse files Browse the repository at this point in the history
* [JENKINS-71025] Remove inline JS from configure-common

replaces jenkinsci#6861

* remove inline jd for jdk check
  • Loading branch information
mawinter69 authored Jan 25, 2024
1 parent 70f2237 commit f640efc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions core/src/main/java/hudson/model/AbstractProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -1940,6 +1940,11 @@ public boolean isApplicable(Descriptor descriptor) {
return true;
}

@Restricted(DoNotUse.class)
public FormValidation doCheckDisplayNameOrNull(@AncestorInPath AbstractProject project, @QueryParameter String value) {
return Jenkins.get().doCheckDisplayName(value, project.getName());
}

@Restricted(DoNotUse.class)
public FormValidation doCheckAssignedLabelString(@AncestorInPath AbstractProject<?, ?> project,
@QueryParameter String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ THE SOFTWARE.
<!-- if there's only one JDK configured, always use that. -->
<f:entry title="JDK"
description="${%JDK to be used for this project}">
<select class="jenkins-input validated" name="jdk" checkUrl="'${rootURL}/defaultJDKCheck?value='+this.value">
<select class="jenkins-input validated" name="jdk" checkUrl="${rootURL}/defaultJDKCheck" checkDependsOn="">
<j:getStatic var="DEFAULT_NAME" className="hudson.model.JDK" field="DEFAULT_NAME"/>
<option>${DEFAULT_NAME}</option>
<j:forEach var="inst" items="${jdks}">
Expand All @@ -54,7 +54,7 @@ THE SOFTWARE.
<p:config-blockWhenDownstreamBuilding />
<st:include page="configure-advanced.jelly" optional="true" />
<f:entry title="${%Display Name}" field="displayNameOrNull">
<f:textbox checkUrl="'${rootURL}/checkDisplayName?displayName='+encodeURIComponent(this.value)+'&amp;jobName='+encodeURIComponent('${h.jsStringEscape(it.name)}')"/>
<f:textbox/>
</f:entry>
<f:optionalBlock name="keepDependencies" checked="${it.keepDependencies}" title="${%Keep the build logs of dependencies}" help="/help/tasks/fingerprint/keepDependencies.html"/>
</f:advanced>
Expand Down

0 comments on commit f640efc

Please sign in to comment.