From f2ef53cff7dba264a013e1c51e15579f246fd934 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Tue, 10 Nov 2020 12:03:33 +1100 Subject: [PATCH] Minor custom field fixes --- .../discourse/components/custom-field-input.js.es6 | 4 ++-- config/locales/server.en.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/components/custom-field-input.js.es6 b/assets/javascripts/discourse/components/custom-field-input.js.es6 index 31b8dc7c..c30a016a 100644 --- a/assets/javascripts/discourse/components/custom-field-input.js.es6 +++ b/assets/javascripts/discourse/components/custom-field-input.js.es6 @@ -106,13 +106,13 @@ export default Component.extend({ } this.saveField(data).then((result) => { + this.set('saving', false); if (result.success) { - this.set('saveIcon', 'check'); + this.set('field.edit', false); } else { this.set('saveIcon', 'times'); } setTimeout(() => this.set('saveIcon', null), 10000); - this.set('saving', false); }); } } diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 6aa27a7b..d6c136ff 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -15,7 +15,7 @@ en: unsupported_type: "%{type} is not a supported custom field type" name_invalid: "'%{name}' is not a valid custom field name" name_too_short: "'%{name}' is too short for a custom field name (min length is #{min_length})" - name_already_taken: "'%{value}' is already taken as a custom field name" + name_already_taken: "'%{name}' is already taken as a custom field name" save_default: "Failed to save custom field '%{name}'" field: