agregar opción "en blanco"

This commit is contained in:
f 2018-12-14 10:52:22 -03:00
parent 8c2928e833
commit 5d89afdd64
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
3 changed files with 3 additions and 1 deletions

View file

@ -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?,

View file

@ -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

View file

@ -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