diff --git a/app/models/metadata_new_predefined_value.rb b/app/models/metadata_new_predefined_value.rb index ff839759..929934b2 100644 --- a/app/models/metadata_new_predefined_value.rb +++ b/app/models/metadata_new_predefined_value.rb @@ -1,4 +1,8 @@ # frozen_string_literal: true # Nueva interfaz -class MetadataNewPredefinedValue < MetadataPredefinedValue; end +class MetadataNewPredefinedValue < MetadataPredefinedValue + def values + @values ||= (required ? {} : { I18n.t('posts.attributes.new_predefined_value.empty') => '' }).merge(super) + end +end diff --git a/config/locales/en.yml b/config/locales/en.yml index ec5b34a9..955f3d20 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -761,6 +761,8 @@ en: edit: "Edit" new_predefined_array: edit: "Edit" + new_predefined_value: + empty: "(Empty)" new_array: edit: "Edit" new_has_one: diff --git a/config/locales/es.yml b/config/locales/es.yml index 61c645a0..6f567933 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -768,8 +768,10 @@ es: new_has_and_belongs_to_many: edit: "Editar" new_predefined_array: + empty: "(Vacío)" edit: "Editar" new_predefined_value: + empty: "(Vacío)" edit: "Editar" new_array: edit: "Editar"