FEATURE: Add an option to show custom user fields on profiles. Default is to not show them.

This commit is contained in:
Neil Lalonde
2015-01-29 17:38:39 -05:00
parent 22adb682d8
commit 644c7a4675
9 changed files with 60 additions and 4 deletions
@@ -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);