mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 14:56:22 +00:00
fix: reemplazar el archivo #16968
This commit is contained in:
parent
ef05f10b70
commit
4645a117ab
2 changed files with 18 additions and 1 deletions
|
@ -19,6 +19,13 @@ $custom-file-text: (
|
|||
pt-BR: "Buscar arquivo"
|
||||
);
|
||||
|
||||
$custom-file-text-replace: (
|
||||
en: "Replace file",
|
||||
es: "Reemplazar archivo",
|
||||
pt: "substituir ficheiro",
|
||||
pt-BR: "substituir arquivo"
|
||||
);
|
||||
|
||||
// Redefinir variables de Bootstrap
|
||||
$primary: $magenta;
|
||||
$secondary: $black;
|
||||
|
@ -51,6 +58,16 @@ $sizes: (
|
|||
@import "bootstrap";
|
||||
@import "editor";
|
||||
|
||||
.custom-file-input {
|
||||
&.replace-image {
|
||||
@each $lang, $value in $custom-file-text-replace {
|
||||
&:lang(#{$lang}) ~ .custom-file-label::after {
|
||||
content: $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@each $color, $rgb in $theme-colors {
|
||||
.#{$color} {
|
||||
color: var(--#{$color});
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
.custom-file
|
||||
= file_field(*field_name_for(base, attribute, :path),
|
||||
**field_options(attribute, metadata, required: (metadata.required && !metadata.path?)),
|
||||
class: "custom-file-input #{invalid(post, attribute)}",
|
||||
class: ['custom-file-input', invalid(post, attribute), ('replace-image' if metadata.static_file)].compact.join(' '),
|
||||
accept: ActiveStorage.web_image_content_types.join(','),
|
||||
lang: locale,
|
||||
data: { 'file-preview-target': 'input', action: 'file-preview#update' })
|
||||
|
|
Loading…
Reference in a new issue