mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 20:18:23 -05:00
FEATURE: Add an option to show custom user fields on profiles. Default is to not show them.
This commit is contained in:
@@ -17,15 +17,18 @@ export default Ember.ObjectController.extend(BufferedContent, {
|
||||
if (this.get('required')) {
|
||||
ret.push(I18n.t('admin.user_fields.required.enabled'));
|
||||
}
|
||||
if (this.get('show_on_profile')) {
|
||||
ret.push(I18n.t('admin.user_fields.show_on_profile.enabled'));
|
||||
}
|
||||
|
||||
return ret.join(', ');
|
||||
}.property('editable', 'required'),
|
||||
}.property('editable', 'required', 'show_on_profile'),
|
||||
|
||||
actions: {
|
||||
save: function() {
|
||||
var self = this;
|
||||
|
||||
var attrs = this.get('buffered').getProperties('name', 'description', 'field_type', 'editable', 'required');
|
||||
var attrs = this.get('buffered').getProperties('name', 'description', 'field_type', 'editable', 'required', 'show_on_profile');
|
||||
|
||||
this.get('model').save(attrs).then(function(res) {
|
||||
self.set('model.id', res.user_field.id);
|
||||
|
||||
Reference in New Issue
Block a user