form should have a name for programmatic clients

This commit is contained in:
Kohsuke Kawaguchi committed 2011-06-13 21:32:08 -07:00
1 parent bbdf5c2115
commit 112e4f7d0b
2 files changed
+3 -3

No files matched your search

@@ -54,7 +54,7 @@ THE SOFTWARE.
<j:set var="descriptors" value="${h.filterDescriptors(it,attrs.descriptors)}" />
<s:form method="post" action="${attrs.action?:'createItem'}">
<s:form method="post" action="${attrs.action?:'createItem'}" name="createItem">
<s:entry title="${attrs.nameTitle}">
<s:textbox id="name" name="name" checkUrl="'${rootURL}/${h.jsStringEscape(attrs.checkUrl)}?value='+encodeURIComponent(this.value)"
onchange="updateOk(this.form)" onkeyup="updateOk(this.form)" />
@@ -52,7 +52,7 @@ public class ViewTest extends HudsonTestCase {
public void testConflictingName() throws Exception {
assertNull(hudson.getView("foo"));
HtmlForm form = new WebClient().goTo("newView").getFormByName("createView");
HtmlForm form = new WebClient().goTo("newView").getFormByName("createItem");
form.getInputByName("name").setValueAttribute("foo");
form.getRadioButtonsByName("mode").get(0).setChecked(true);
submit(form);
@@ -85,7 +85,7 @@ public class ViewTest extends HudsonTestCase {
hudson.addView(listView);
HtmlPage newViewPage = wc.goTo("/user/me/my-views/newView");
HtmlForm form = newViewPage.getFormByName("createView");
HtmlForm form = newViewPage.getFormByName("createItem");
form.getInputByName("name").setValueAttribute("proxy-view");
((HtmlRadioButtonInput) form.getInputByValue("hudson.model.ProxyView")).setChecked(true);
HtmlPage proxyViewConfigurePage = submit(form);