basic version of ValidationMixin, register page getting more functional

This commit is contained in:
Edin Dazdarevic
2015-02-23 21:30:06 +01:00
parent 9c152e8adb
commit e1bba9d8db
4 changed files with 174 additions and 23 deletions

View File

@@ -0,0 +1,26 @@
var Backbone = require('backbone');
var Globals = require('../globals');
var UserRegistration = Backbone.Model.extend({
initialize: function() {
$.ajaxPrefilter(
function(options, originalOptions, jqXHR) {
options.xhrFields = {
withCredentials: true
}
}
);
},
url: Globals.ApiUrl + '/user',
defaults: {
first_name : '',
last_name : '',
email : '',
password: '',
password_confirmation: ''
}
});
module.exports = UserRegistration;