/** * @requires $ jQuery * @requires _ UnderscoreJS */ (function (/* Object */ ns) { "use strict"; ns.Form = function (options) { qs.FormNode.apply(this, arguments); this.init(options); }; var proto = ns.Form.prototype = Object.create(qs.FormNode.prototype); proto.init = function (options) { this.dialog = new app.termsDialog.Dialog(options.dialog); Qs_Form.setFormOption(this.node.prop('id'), 'onSuccessCallback', this.dialog.show.bind(this.dialog)); this.dialog.node.on('agree', (function () { this.node.get(0).submit(); }).bind(this)); }; })(qs.defineNS('app.termsDialog'));