Commit bd652525 authored by CarlosGC1989's avatar CarlosGC1989
Browse files

Añade recaptcha en modelo de feedback

parent f73e1ca5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@ define([
			},
			codeError: {
				type: ["string", "null"]
			},
			reCaptcha: {
				type: "string"
			}
		}
	};
+9 −4
Original line number Diff line number Diff line
@@ -156,6 +156,9 @@ define([
			//

			this.reCaptchaVerify = true;
			this._emitEvt('SET_VALUE', {
				reCaptcha: this.reCaptcha.getResponse()
			});
		},

		_resetForm: function() {
@@ -178,8 +181,7 @@ define([
			//		callback private
			//

			this._once(this.modelInstance.getChannel("WAS_VALID"),
				lang.hitch(this, this._wasValid));
			this._once(this.modelInstance.getChannel("WAS_VALID"), lang.hitch(this, this._wasValid));

			this._submitActive = true;

@@ -210,11 +212,14 @@ define([
			this._emitEvt('LOADED');

			if (result.success) {
				alertify.alert(this.i18n.success, this.i18n.sendFeedback,
				alertify.alert(
					this.i18n.success,
					this.i18n.sendFeedback,
					lang.hitch(this, function() {
						this._resetForm();
						window.location.href = "/";
					}));
					})
				);
			} else {
				this._handleError(result.error);
			}
+4 −3
Original line number Diff line number Diff line
@@ -7,9 +7,10 @@

		<div class="feedbackForm" data-dojo-attach-point="feedbackForm"></div>
		<div class="boxButton">
			<div data-dojo-type="dijit/form/Button"
					data-dojo-props="class: 'primary btn-block'"
					data-dojo-attach-event="click: _onSubmitFeedback">${i18n.send}</div>
			<div data-dojo-type="dijit/form/Button" data-dojo-props="class: 'primary btn-block'"
				data-dojo-attach-event="click: _onSubmitFeedback">
				${i18n.send}
			</div>
		</div>
	</div>
</div>
 No newline at end of file