limite para los textarea

This commit is contained in:
f 2018-07-23 16:15:34 -03:00
parent ba8ae50776
commit 66007e90d3
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
3 changed files with 8 additions and 1 deletions

View file

@ -1,2 +1,5 @@
= text_area_tag field_name_for_post_as_string(name), value,
class: 'form-control', required: template.required?
class: 'form-control', required: template.required?,
maxlength: template.max > 0 ? template.max : nil
- if template.max > 0
%small= t('posts.text_area.max', max: template.max)

View file

@ -209,6 +209,8 @@ en:
select:
placeholder: 'Type to filter available options'
max: 'You can select up to %{max} options'
text_area:
max: 'Up to %{max} characters'
table: 'This field is a group of fields, you can add more groups with the "Add group" button or remove them with the "Remove group" button.'
row:
add: 'Add group'

View file

@ -205,6 +205,8 @@ es:
select:
placeholder: 'Empieza a escribir para filtrar las opciones disponibles'
max: 'Puedes seleccionar hasta %{max} opciones'
text_area:
max: 'Hasta %{max} caracteres'
table: 'Este campo es un grupo de campos, puede agregar los que necesites con el botón "Agregar grupo" o eliminar los que no con "Eliminar grupo"'
row:
add: 'Agregar grupo'