mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: Show user fields when the user is signing up
This commit is contained in:
parent
872d8fce58
commit
edb34c178a
42 changed files with 476 additions and 141 deletions
|
@ -2,8 +2,10 @@ import UserField from 'admin/models/user-field';
|
|||
|
||||
export default Ember.ArrayController.extend({
|
||||
fieldTypes: null,
|
||||
|
||||
createDisabled: Em.computed.gte('model.length', 3),
|
||||
userFieldsName: function() {
|
||||
return I18n.t('admin.user_fields.name');
|
||||
}.property(),
|
||||
|
||||
_performDestroy: function(f, model) {
|
||||
return f.destroy().then(function() {
|
||||
|
@ -13,10 +15,7 @@ export default Ember.ArrayController.extend({
|
|||
|
||||
actions: {
|
||||
createField: function() {
|
||||
this.pushObject(UserField.create({
|
||||
field_type: 'text',
|
||||
name: I18n.t('admin.user_fields.untitled')
|
||||
}));
|
||||
this.pushObject(UserField.create({ field_type: 'text' }));
|
||||
},
|
||||
|
||||
destroy: function(f) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue