style(attachments): better UX when we can try to upload without network
This commit is contained in:
parent
42b84384dd
commit
cb2afc74b0
6 changed files with 15 additions and 12 deletions
|
@ -98,7 +98,7 @@ class Attachment::EditComponent < ApplicationComponent
|
|||
def retry_button_options
|
||||
{
|
||||
type: 'button',
|
||||
class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-mt-1w fr-icon-refresh-line fr-btn--icon-left attachment-error-retry',
|
||||
class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-mt-1w attachment-upload-error-retry',
|
||||
data: { input_target: ".#{attachment_input_class}", action: 'autosave#onClickRetryButton' }
|
||||
}
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
fr:
|
||||
max_file_size: "Taille maximale : %{max_file_size}."
|
||||
allowed_formats: "Formats supportés : %{formats}"
|
||||
retry: Ré-essayer
|
||||
retry: Réessayer
|
||||
delete: Supprimer
|
||||
errors:
|
||||
uploading: "Une erreur s’est produite pendant l’envoi du fichier."
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
.fr-mt-2w
|
||||
= render component
|
||||
|
||||
.attachment-error.hidden
|
||||
%p.fr-error-text= t('.errors.uploading')
|
||||
= button_tag(**retry_button_options) do
|
||||
= t(".retry")
|
||||
.attachment-upload-error.hidden
|
||||
%p.fr-error-text= t('.errors.uploading')
|
||||
= button_tag(**retry_button_options) do
|
||||
= t(".retry")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue