diff --git a/core/src/main/resources/lib/hudson/project/makeDisabled.jelly b/core/src/main/resources/lib/hudson/project/makeDisabled.jelly
index e53f9ab12ad9..9eb7f4f6571c 100644
--- a/core/src/main/resources/lib/hudson/project/makeDisabled.jelly
+++ b/core/src/main/resources/lib/hudson/project/makeDisabled.jelly
@@ -41,5 +41,14 @@ THE SOFTWARE.
+
+
+
+
+
diff --git a/test/src/test/java/hudson/model/ProjectTest.java b/test/src/test/java/hudson/model/ProjectTest.java
index e3f2d84493e3..82d9266e0e62 100644
--- a/test/src/test/java/hudson/model/ProjectTest.java
+++ b/test/src/test/java/hudson/model/ProjectTest.java
@@ -644,13 +644,15 @@ public void testDoDisable() throws Exception {
JenkinsRule.WebClient wc = j.createWebClient();
wc.withBasicCredentials(user.getId(), "password");
+ HtmlPage p = wc.goTo(project.getUrl());
- HtmlPage p = wc.getPage(project, "configure");
- HtmlForm form = p.getFormByName("config");
- form.getInputByName("enable").click();
- j.submit(form);
-
- assertTrue("Project should be disabled.", project.isDisabled());
+ List forms = p.getForms();
+ for (HtmlForm form : forms) {
+ if ("disable".equals(form.getAttribute("action"))) {
+ j.submit(form);
+ }
+ }
+ assertTrue("Project should be disabled.", project.isDisabled());
}
@Test