[MRM-393]

- Updated javascript function setAndSubmit(..)
- Changed getBlackListPattern() to getPattern in ConfigureProxyConnectorAction.removeBlackListPattern()



git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@567556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2007-08-20 06:38:54 +00:00
parent bb21670396
commit d011dad404
2 changed files with 17 additions and 18 deletions

View File

@ -219,7 +219,7 @@ public class ConfigureProxyConnectorAction
if ( StringUtils.isBlank( pattern ) ) if ( StringUtils.isBlank( pattern ) )
{ {
addActionError( "Cannot add an blank white list pattern." ); addActionError( "Cannot add a blank white list pattern." );
} }
if ( !hasActionErrors() ) if ( !hasActionErrors() )
@ -237,7 +237,7 @@ public class ConfigureProxyConnectorAction
if ( StringUtils.isBlank( pattern ) ) if ( StringUtils.isBlank( pattern ) )
{ {
addActionError( "Cannot remove an blank white list pattern." ); addActionError( "Cannot remove a blank white list pattern." );
} }
if ( !hasActionErrors() ) if ( !hasActionErrors() )
@ -255,7 +255,7 @@ public class ConfigureProxyConnectorAction
if ( StringUtils.isBlank( pattern ) ) if ( StringUtils.isBlank( pattern ) )
{ {
addActionError( "Cannot add an blank black list pattern." ); addActionError( "Cannot add a blank black list pattern." );
} }
if ( !hasActionErrors() ) if ( !hasActionErrors() )
@ -269,11 +269,11 @@ public class ConfigureProxyConnectorAction
public String removeBlackListPattern() public String removeBlackListPattern()
{ {
String pattern = getBlackListPattern(); String pattern = getPattern();
if ( StringUtils.isBlank( pattern ) ) if ( StringUtils.isBlank( pattern ) )
{ {
addActionError( "Cannot remove an blank black list pattern." ); addActionError( "Cannot remove a blank black list pattern." );
} }
if ( !hasActionErrors() ) if ( !hasActionErrors() )

View File

@ -36,18 +36,6 @@
<head> <head>
<title>Admin : ${addedit} Proxy Connector</title> <title>Admin : ${addedit} Proxy Connector</title>
<ww:head/> <ww:head/>
<script type="text/javascript">
<!--
function setAndSubmit(id, value, action)
{
var f = document.forms.saveProxyConnector;
f.action = action;
f[id].value = value;
f.submit();
}
//-->
</script>
</head> </head>
<body> <body>
@ -59,7 +47,7 @@
<ww:actionerror/> <ww:actionerror/>
<ww:actionmessage/> <ww:actionmessage/>
<ww:form method="post" action="saveProxyConnector" namespace="/admin"> <ww:form name="saveProxyConnector" method="post" action="saveProxyConnector" namespace="/admin">
<ww:hidden name="mode"/> <ww:hidden name="mode"/>
<input type="hidden" name="pattern"/> <input type="hidden" name="pattern"/>
@ -234,7 +222,18 @@
</ww:form> </ww:form>
<script type="text/javascript"> <script type="text/javascript">
<!--
document.getElementById("saveProxyConnector_proxyId").focus(); document.getElementById("saveProxyConnector_proxyId").focus();
function setAndSubmit(id, value, action)
{
var f = document.forms['saveProxyConnector'];
f.action = action;
f.elements[id].value = value;
f.submit();
}
//-->
</script> </script>
</div> </div>