mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 15:51:05 +08:00
FEATURE: Show user fields when the user is signing up
This commit is contained in:
@ -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 }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user