Commit 71818853 authored by CarlosGC1989's avatar CarlosGC1989
Browse files

Arregla error en uploadFile con submit

parent a8407f5e
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -271,16 +271,16 @@ define([
			}
		},

		_descriptionError: function() {

			var inputName;
		_descriptionError: function(inputName) {

			if (!inputName) {
				for (var key in this._inputsInfo) {
					if (!this._inputsInfo[key].isValid) {
						inputName = key;
						break;
					}
				}
			}

			return this._generateDescriptionError(inputName);
		},
@@ -335,6 +335,7 @@ define([
			if (res.success) {
				dfd.resolve();
			} else if (res.error) {
				res.error.propertyName = res.propertyName;
				dfd.reject(res.error);
			} else if (res.cancel) {
				dfd.cancel(res.cancel);
@@ -352,7 +353,7 @@ define([
			this._emitEvt('LOADED');
			this._emitEvt('ENABLE_BUTTONS');

			var description = this._descriptionError();
			var description = this._descriptionError(res.propertyName);

			if (res.description) {
				description += '. ' + res.description + '.';
+5 −5
Original line number Diff line number Diff line
@@ -162,6 +162,11 @@ define([

		_submit: function(req) {

			if (!this._fileCount) {

				return this.inherited(arguments);
			}

			if (!this._inputInstance.validate()) {

				var error = this._lastObjStatusUpdate && this._lastObjStatusUpdate.error,
@@ -175,11 +180,6 @@ define([
				});
			}

			if (!this._fileCount) {

				return this.inherited(arguments);
			}

			this._submitDfd = new Deferred();

			this._submitDfd.then(lang.hitch(this, function() {