Created
August 7, 2015 13:29
-
-
Save pedrokoblitz/980fcf09b077e98e4631 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(exports) { | |
| function WPForm() { | |
| this.formEl = ''; | |
| this.messagesEl = ''; | |
| this.validationRules = {}; | |
| this.payload = {}; | |
| this.messages = []; | |
| } | |
| WPForm.prototype.serialize = function() { | |
| }; | |
| WPForm.prototype.validate = function() { | |
| }; | |
| WPForm.prototype.post = function() { | |
| }; | |
| WPForm.prototype.handleResponse = function() { | |
| }; | |
| WPForm.prototype.addMessage = function(message) { | |
| this.messages.push(message); | |
| }; | |
| WPForm.prototype.displayMessages = function() { | |
| }; | |
| function exposed_func_name() { | |
| var form = new WPForm(); | |
| } | |
| var wpForm = { | |
| WPForm: WPForm, | |
| exposed_func_name: exposed_func_name | |
| }; | |
| if (typeof define === 'function' && define.amd) { | |
| /* AMD support */ | |
| define(function() { | |
| return wpForm; | |
| }); | |
| } else { | |
| exports.wpForm = wpForm; | |
| } | |
| })(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment