diff --git a/app/views/admin/procedures/show.html.haml b/app/views/admin/procedures/show.html.haml index 306e39de8..471bd5efa 100644 --- a/app/views/admin/procedures/show.html.haml +++ b/app/views/admin/procedures/show.html.haml @@ -155,4 +155,4 @@ hide_admin_procedure_path(procedure), method: :post, class: "btn btn-danger", - data: { confirm: "Voulez-vous supprimer la procédure ?", disable_with: "Suppression..." } + data: { confirm: "Voulez-vous supprimer la procédure ?", disable: true } diff --git a/app/views/admin/profile/show.html.haml b/app/views/admin/profile/show.html.haml index 78efa24f2..6db4323b4 100644 --- a/app/views/admin/profile/show.html.haml +++ b/app/views/admin/profile/show.html.haml @@ -5,4 +5,4 @@ API TOKEN : = @administrateur.api_token %p - = link_to "Regénérer mon token", admin_renew_api_token_path, method: :post, class: "btn btn-default", data: { confirm: "Confirmez-vous la regénération de votre token ? Les applications qui l'utilisent actuellement seront bloquées.", disable_with: "Regénération..." } + = link_to "Regénérer mon token", admin_renew_api_token_path, method: :post, class: "btn btn-default", data: { confirm: "Confirmez-vous la regénération de votre token ? Les applications qui l'utilisent actuellement seront bloquées.", disable: true } diff --git a/app/views/admin/types_de_champ/_fields.html.haml b/app/views/admin/types_de_champ/_fields.html.haml index 4472a2c8d..ce4b38913 100644 --- a/app/views/admin/types_de_champ/_fields.html.haml +++ b/app/views/admin/types_de_champ/_fields.html.haml @@ -65,7 +65,7 @@ = f.button 'Ajouter le champ', id: @types_de_champ_facade.add_button_id, class: 'btn btn-success', - data: { disable_with: 'Envoi...' } + data: { disable: true } - else = link_to("", @types_de_champ_facade.delete_url(ff), method: :delete, remote: true, id: "delete_type_de_champ_#{ff.object.id}", class: %w(form-control btn btn-danger fa fa-trash-o) ) diff --git a/app/views/admin/types_de_champ/_form.html.haml b/app/views/admin/types_de_champ/_form.html.haml index a8e1b22c7..36c2b6c8d 100644 --- a/app/views/admin/types_de_champ/_form.html.haml +++ b/app/views/admin/types_de_champ/_form.html.haml @@ -4,7 +4,7 @@ = f.button 'Enregistrer', id: :save, class: 'btn btn-success', - data: { disable_with: 'Envoi...' } + data: { disable: true } %hr #new_type_de_champ diff --git a/app/views/demandes/new.html.haml b/app/views/demandes/new.html.haml index 1cf5ae528..ca4a68199 100644 --- a/app/views/demandes/new.html.haml +++ b/app/views/demandes/new.html.haml @@ -40,4 +40,4 @@ %span.mandatory * = text_field_tag :address, nil, required: true - = submit_tag 'Envoyer', class: 'button', data: { disable_with: "Envoi..." } + = submit_tag 'Envoyer', class: 'button', data: { disable: true } diff --git a/app/views/dossiers/commentaires/_form.html.haml b/app/views/dossiers/commentaires/_form.html.haml index f4011836a..a142bdf23 100644 --- a/app/views/dossiers/commentaires/_form.html.haml +++ b/app/views/dossiers/commentaires/_form.html.haml @@ -7,4 +7,4 @@ %h4.text-primary{ style: 'margin-top: 0px;' } Ajouter un fichier = file_field_tag "file", accept: Commentaire.new.file.accept_extension_list, style: 'float: left; margin-left: 20px;' .col-md-6.text-right - = submit_tag 'Envoyer', id: 'save-message', class: 'form-control btn btn-danger', data: { disable_with: 'Envoi...' } + = submit_tag 'Envoyer', id: 'save-message', class: 'form-control btn btn-danger', data: { disable: true } diff --git a/app/views/dossiers/etapes/etape_2/_entreprise.html.haml b/app/views/dossiers/etapes/etape_2/_entreprise.html.haml index 7298345b1..033584354 100644 --- a/app/views/dossiers/etapes/etape_2/_entreprise.html.haml +++ b/app/views/dossiers/etapes/etape_2/_entreprise.html.haml @@ -20,7 +20,7 @@ .form-group.form-group-lg = f.text_field :siret, id: "dossier-siret", class: "form-control", placeholder: "Entrez votre Siret", value: @siret = f.hidden_field :dossier_id, value: @facade.dossier.id - = f.submit 'Valider', class: %w(btn btn-lg btn-success), id: 'submit-siret', data: { disable_with: "Recherche en cours ..." } + = f.submit 'Valider', class: %w(btn btn-lg btn-success), id: 'submit-siret', data: { disable: true } - else %br #recap-info-entreprise diff --git a/app/views/layouts/_etape_suivante.html.haml b/app/views/layouts/_etape_suivante.html.haml index 23b68d504..0a584ed5e 100644 --- a/app/views/layouts/_etape_suivante.html.haml +++ b/app/views/layouts/_etape_suivante.html.haml @@ -1 +1 @@ -= submit_tag 'Etape suivante', class: %w(btn btn btn-info), style: 'float: right;', id: 'etape_suivante', data: { disable_with: 'Etape suivante', submit: true } += submit_tag 'Etape suivante', class: %w(btn btn btn-info), style: 'float: right;', id: 'etape_suivante', data: { disable: true, submit: true } diff --git a/app/views/layouts/_modifications_terminees.html.haml b/app/views/layouts/_modifications_terminees.html.haml index d653f1044..085d66947 100644 --- a/app/views/layouts/_modifications_terminees.html.haml +++ b/app/views/layouts/_modifications_terminees.html.haml @@ -1,3 +1,3 @@ %div{ style: 'float: right;' } %a.btn{ href: "/users/dossiers/#{@dossier.id}/recapitulatif" } Retour - = submit_tag 'Modification terminée', class: %w(btn btn btn-info), id: 'modification_terminee', data: { disable_with: 'Modification terminée', submit: true } + = submit_tag 'Modification terminée', class: %w(btn btn btn-info), id: 'modification_terminee', data: { disable: true, submit: true } diff --git a/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml b/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml index ede49a733..58b2d42e8 100644 --- a/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml +++ b/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml @@ -12,7 +12,7 @@ locals: { champ: champ, form: champ_form, seen_at: @annotations_privees_seen_at } .send-wrapper - = f.submit 'Sauvegarder', class: 'button send', data: { disable_with: "Envoi..." } + = f.submit 'Sauvegarder', class: 'button send', data: { disable: true } - else %h2.empty-text Aucune annotation privée diff --git a/app/views/new_gestionnaire/shared/messages/_form.html.haml b/app/views/new_gestionnaire/shared/messages/_form.html.haml index 09821e729..aff5b4500 100644 --- a/app/views/new_gestionnaire/shared/messages/_form.html.haml +++ b/app/views/new_gestionnaire/shared/messages/_form.html.haml @@ -8,4 +8,4 @@ (taille max : 20 Mo) .send-wrapper - = f.submit 'Envoyer', class: 'button send', data: { disable_with: "Envoi…" } + = f.submit 'Envoyer', class: 'button send', data: { disable: true } diff --git a/app/views/shared/dossiers/_edit.html.haml b/app/views/shared/dossiers/_edit.html.haml index beae0cdbd..ba27df72a 100644 --- a/app/views/shared/dossiers/_edit.html.haml +++ b/app/views/shared/dossiers/_edit.html.haml @@ -64,7 +64,7 @@ = link_to ask_deletion_dossier_path(dossier), method: :post, class: 'button danger', - data: { disable_with: 'Supprimer le brouillon', confirm: 'En continuant, vous allez supprimer ce dossier ainsi que les informations qu’il contient. Toute suppression entraine l’annulation de la démarche en cours.\n\nConfirmer la suppression ?' } do + data: { disable: true, confirm: 'En continuant, vous allez supprimer ce dossier ainsi que les informations qu’il contient. Toute suppression entraine l’annulation de la démarche en cours.\n\nConfirmer la suppression ?' } do Supprimer le brouillon = f.button 'Enregistrer le brouillon', @@ -72,18 +72,18 @@ name: :save_draft, value: true, class: 'button send secondary', - data: { disable_with: 'Enregistrer le brouillon' } + data: { disable: true } - if dossier.can_transition_to_en_construction? = f.button 'Soumettre le dossier', class: 'button send primary', disabled: !current_user.owns?(dossier), - data: { disable_with: 'Soumettre le dossier' } + data: { disable: true } - else = f.button 'Enregistrer les modifications du dossier', class: 'button send primary', - data: { disable_with: 'Enregistrer les modifications du dossier' } + data: { disable: true } - if dossier.brouillon? && !current_user.owns?(dossier) .send-notice.invite-cannot-submit diff --git a/app/views/users/recapitulatif/_modal_upload_pj.html.haml b/app/views/users/recapitulatif/_modal_upload_pj.html.haml index 58adcae3f..8afae1798 100644 --- a/app/views/users/recapitulatif/_modal_upload_pj.html.haml +++ b/app/views/users/recapitulatif/_modal_upload_pj.html.haml @@ -14,4 +14,4 @@ = render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier } .modal-footer - = submit_tag 'Modification terminée', class: %w(btn btn btn-info), id: 'modification_terminee', data: { disable_with: 'Modification terminée', submit: true } + = submit_tag 'Modification terminée', class: %w(btn btn btn-info), id: 'modification_terminee', data: { disable: true, submit: true } diff --git a/app/views/users/siret/_pro.html.haml b/app/views/users/siret/_pro.html.haml index 5ddb0de3d..d9ac910fc 100644 --- a/app/views/users/siret/_pro.html.haml +++ b/app/views/users/siret/_pro.html.haml @@ -13,5 +13,5 @@ .form-group.form-group-lg = text_field_tag :siret, nil, :class => "form-control", :placeholder => "Entrez votre Siret", :id => "siret", :name => "siret", :maxlength => 14, :style => 'margin-bottom: 10px', value: @siret %br - = submit_tag "Commencer", class: %w(btn btn-lg btn-success), style: 'margin-top: 20px;', data: { disable_with: "Commencer", submit: true } + = submit_tag "Commencer", class: %w(btn btn-lg btn-success), style: 'margin-top: 20px;', data: { disable: true, submit: true } %input{ type: 'hidden', value: "#{@procedure.id}", name: 'procedure_id', id: 'procedure_id' }