FEATURE: Show user fields when the user is signing up

This commit is contained in:
Robin Ward
2014-09-26 14:48:34 -04:00
parent 872d8fce58
commit edb34c178a
42 changed files with 476 additions and 141 deletions

View File

@ -17,17 +17,17 @@ var UserField = Ember.Object.extend({
});
},
save: function() {
save: function(attrs) {
var id = this.get('id');
if (!id) {
return Discourse.ajax("/admin/customize/user_fields", {
type: "POST",
data: { user_field: this.getProperties('name', 'field_type') }
data: { user_field: attrs }
});
} else {
return Discourse.ajax("/admin/customize/user_fields/" + id, {
type: "PUT",
data: { user_field: this.getProperties('name', 'field_type') }
data: { user_field: attrs }
});
}
}