mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 13:11:18 +08:00
FEATURE: Show user fields when the user is signing up
This commit is contained in:
@ -13,10 +13,12 @@ export default Ember.ObjectController.extend(BufferedContent, {
|
||||
save: function() {
|
||||
var self = this;
|
||||
|
||||
this.commitBuffer();
|
||||
this.get('model').save().then(function(res) {
|
||||
var attrs = this.get('buffered').getProperties('name', 'field_type', 'editable');
|
||||
|
||||
this.get('model').save(attrs).then(function(res) {
|
||||
self.set('model.id', res.user_field.id);
|
||||
self.set('editing', false);
|
||||
self.commitBuffer();
|
||||
}).catch(function() {
|
||||
bootbox.alert(I18n.t('generic_error'));
|
||||
});
|
||||
|
Reference in New Issue
Block a user