mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 19:26:21 +00:00
Merge branch 'validar-sitio-antes-de-guardar-la-imagen' into 'rails'
validar el sitio antes de subir una imagen Closes #1192, #1193, #1194, #1195, #1196, and #1197 See merge request sutty/sutty!17
This commit is contained in:
commit
eafe5fa96c
3 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,7 @@ class MetadataFile < MetadataTemplate
|
||||||
def validate
|
def validate
|
||||||
super
|
super
|
||||||
|
|
||||||
|
errors << I18n.t("metadata.#{type}.site_invalid") if site.invalid?
|
||||||
errors << I18n.t("metadata.#{type}.path_required") if path_missing?
|
errors << I18n.t("metadata.#{type}.path_required") if path_missing?
|
||||||
errors << I18n.t("metadata.#{type}.no_file_for_description") if no_file_for_description?
|
errors << I18n.t("metadata.#{type}.no_file_for_description") if no_file_for_description?
|
||||||
|
|
||||||
|
|
|
@ -37,10 +37,12 @@ en:
|
||||||
metadata:
|
metadata:
|
||||||
cant_be_empty: 'This field cannot be empty'
|
cant_be_empty: 'This field cannot be empty'
|
||||||
image:
|
image:
|
||||||
|
site_invalid: 'The image cannot be stored if the site configuration is not valid'
|
||||||
not_an_image: 'Not an image'
|
not_an_image: 'Not an image'
|
||||||
path_required: 'Missing image for upload'
|
path_required: 'Missing image for upload'
|
||||||
no_file_for_description: "Description with no associated image"
|
no_file_for_description: "Description with no associated image"
|
||||||
file:
|
file:
|
||||||
|
site_invalid: 'The file cannot be stored if the site configuration is not valid'
|
||||||
path_required: "Missing file for upload"
|
path_required: "Missing file for upload"
|
||||||
no_file_for_description: "Description with no associated file"
|
no_file_for_description: "Description with no associated file"
|
||||||
event:
|
event:
|
||||||
|
|
|
@ -37,10 +37,12 @@ es:
|
||||||
metadata:
|
metadata:
|
||||||
cant_be_empty: 'El campo no puede estar vacío'
|
cant_be_empty: 'El campo no puede estar vacío'
|
||||||
image:
|
image:
|
||||||
|
site_invalid: 'La imagen no se puede almacenar si la configuración del sitio no es válida'
|
||||||
not_an_image: 'No es una imagen'
|
not_an_image: 'No es una imagen'
|
||||||
path_required: 'Se necesita una imagen'
|
path_required: 'Se necesita una imagen'
|
||||||
no_file_for_description: 'Se envió una descripción sin imagen asociada'
|
no_file_for_description: 'Se envió una descripción sin imagen asociada'
|
||||||
file:
|
file:
|
||||||
|
site_invalid: 'El archivo no se puede almacenar si la configuración del sitio no es válida'
|
||||||
path_required: 'Se necesita un archivo'
|
path_required: 'Se necesita un archivo'
|
||||||
no_file_for_description: 'se envió una descripción sin archivo asociado'
|
no_file_for_description: 'se envió una descripción sin archivo asociado'
|
||||||
event:
|
event:
|
||||||
|
|
Loading…
Reference in a new issue