-use is(":checked") because attr("checked") was always returning not set.
-adapt defaultfileupload boolean conversion to handle "1" as true value.


git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1455874 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
skygo 2013-03-13 10:42:32 +00:00
parent 6fd297ec41
commit 1af394618d
2 changed files with 3 additions and 3 deletions

View File

@ -125,8 +125,8 @@ public class DefaultFileUploadService
{ {
String classifier = getStringValue( multipartBody, "classifier" ); String classifier = getStringValue( multipartBody, "classifier" );
boolean pomFile = BooleanUtils.toBoolean( getStringValue( multipartBody, "pomFile" ) ); boolean pomFile = BooleanUtils.toBoolean( getStringValue( multipartBody, "pomFile" ), "1", "" );
Attachment file = multipartBody.getAttachment( "files[]" ); Attachment file = multipartBody.getAttachment( "files[]" );
//Content-Disposition: form-data; name="files[]"; filename="org.apache.karaf.features.command-2.2.2.jar" //Content-Disposition: form-data; name="files[]"; filename="org.apache.karaf.features.command-2.2.2.jar"

View File

@ -107,7 +107,7 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn
} }
); );
fileUpload.bind('fileuploadsubmit', function (e, data) { fileUpload.bind('fileuploadsubmit', function (e, data) {
var pomFile = data.context.find('#pomFile' ).attr("checked"); var pomFile = data.context.find('#pomFile' ).is(":checked");
var classifier = data.context.find('#classifier' ).val(); var classifier = data.context.find('#classifier' ).val();
if (!data.formData){ if (!data.formData){
data.formData={}; data.formData={};