diff --git a/app/views/posts/template_field/_select.haml b/app/views/posts/template_field/_select.haml index 2bd0374..60bf351 100644 --- a/app/views/posts/template_field/_select.haml +++ b/app/views/posts/template_field/_select.haml @@ -1,7 +1,7 @@ - value = [] if value.nil? - values = template.values.empty? ? [value].flatten : template.values = select_tag field_name_for_post_as_string(name), - options_for_select(values, value), + options_for_select([t('posts.blank'), nil] + values, value), { class: 'form-control select2', multiple: template.multiple?, required: template.required?, diff --git a/config/locales/en.yml b/config/locales/en.yml index 85c58b8..1b6e826 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -243,3 +243,4 @@ en: url: 'The address must start with http:// or https://' invalid_help: It looks like the form is incomplete. Check the red-colored fields to complete it. sending_help: Saving, please wait... + blank: Nothing diff --git a/config/locales/es.yml b/config/locales/es.yml index 65a7a6d..ac8b320 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -250,3 +250,4 @@ es: url: 'La dirección debe comenzar con http:// o https://' invalid_help: Parece que el formulario no está completo. Verifica los campos marcados en rojo para completarlo. sending_help: Guardando, por favor espera... + blank: En blanco