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