FIX: no new badges could be created

This commit is contained in:
Sam 2014-07-25 15:48:43 +10:00
parent 1297243759
commit ae686e8188
2 changed files with 5 additions and 1 deletions

View File

@ -127,7 +127,7 @@ Discourse.AdminBadgesController = Ember.ArrayController.extend({
'enabled', 'show_posts',
'target_posts', 'name', 'description',
'icon', 'query', 'badge_grouping_id',
'trigger'];
'trigger', 'badge_type_id'];
if(this.get('selectedItem.system')){
var protectedFields = this.get('protectedSystemFields');

View File

@ -141,6 +141,10 @@ Discourse.Badge = Discourse.Model.extend({
self.set('savingStatus', I18n.t('saved'));
self.set('saving', false);
return self;
}, function(error){
self.set('savingStatus', '');
self.set('saving', false);
bootbox.alert(error.responseText);
});
},