diff --git a/assets/javascripts/discourse/components/custom-field-input.js.es6 b/assets/javascripts/discourse/components/custom-field-input.js.es6 index b5dbec5b..4b1be935 100644 --- a/assets/javascripts/discourse/components/custom-field-input.js.es6 +++ b/assets/javascripts/discourse/components/custom-field-input.js.es6 @@ -15,7 +15,7 @@ export default Component.extend({ postSerializers: ['post'], categorySerializers: ['basic_category', 'topic_view', 'topic_list_item'], klassContent: generateContent(['topic', 'post', 'group', 'category'], 'klass'), - typeContent: generateContent(['string', 'boolean', 'json'], 'type'), + typeContent: generateContent(['string', 'boolean', 'integer', 'json'], 'type'), showInputs: or('field.new', 'field.edit'), @discourseComputed('field.klass') diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 8b21c663..39137f57 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -290,6 +290,7 @@ en: label: "Type" select: "Select a type" string: "String" + integer: "Integer" boolean: "Boolean" json: "JSON" klass: diff --git a/lib/custom_wizard/custom_field.rb b/lib/custom_wizard/custom_field.rb index 0b6483c6..96c21ebb 100644 --- a/lib/custom_wizard/custom_field.rb +++ b/lib/custom_wizard/custom_field.rb @@ -4,7 +4,7 @@ class ::CustomWizard::CustomField CLASSES ||= ["topic", "group", "category", "post"] SERIALIZERS ||= ["topic_view", "topic_list_item", "post", "basic_category"] - TYPES ||= ["string", "boolean", "json"] + TYPES ||= ["string", "boolean", "integer", "json"] ATTRS ||= ["name", "klass", "type", "serializers"] KEY ||= "custom_wizard_custom_fields"