Don’t change a button’s text when disabled after click
This commit is contained in:
parent
8c11c24050
commit
a86e3a3156
14 changed files with 17 additions and 17 deletions
|
@ -155,4 +155,4 @@
|
||||||
hide_admin_procedure_path(procedure),
|
hide_admin_procedure_path(procedure),
|
||||||
method: :post,
|
method: :post,
|
||||||
class: "btn btn-danger",
|
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 }
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
API TOKEN :
|
API TOKEN :
|
||||||
= @administrateur.api_token
|
= @administrateur.api_token
|
||||||
%p
|
%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 }
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
= f.button 'Ajouter le champ',
|
= f.button 'Ajouter le champ',
|
||||||
id: @types_de_champ_facade.add_button_id,
|
id: @types_de_champ_facade.add_button_id,
|
||||||
class: 'btn btn-success',
|
class: 'btn btn-success',
|
||||||
data: { disable_with: 'Envoi...' }
|
data: { disable: true }
|
||||||
- else
|
- 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) )
|
= 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) )
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
= f.button 'Enregistrer',
|
= f.button 'Enregistrer',
|
||||||
id: :save,
|
id: :save,
|
||||||
class: 'btn btn-success',
|
class: 'btn btn-success',
|
||||||
data: { disable_with: 'Envoi...' }
|
data: { disable: true }
|
||||||
|
|
||||||
%hr
|
%hr
|
||||||
#new_type_de_champ
|
#new_type_de_champ
|
||||||
|
|
|
@ -40,4 +40,4 @@
|
||||||
%span.mandatory *
|
%span.mandatory *
|
||||||
= text_field_tag :address, nil, required: true
|
= text_field_tag :address, nil, required: true
|
||||||
|
|
||||||
= submit_tag 'Envoyer', class: 'button', data: { disable_with: "Envoi..." }
|
= submit_tag 'Envoyer', class: 'button', data: { disable: true }
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
%h4.text-primary{ style: 'margin-top: 0px;' } Ajouter un fichier
|
%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;'
|
= file_field_tag "file", accept: Commentaire.new.file.accept_extension_list, style: 'float: left; margin-left: 20px;'
|
||||||
.col-md-6.text-right
|
.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 }
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
.form-group.form-group-lg
|
.form-group.form-group-lg
|
||||||
= f.text_field :siret, id: "dossier-siret", class: "form-control", placeholder: "Entrez votre Siret", value: @siret
|
= 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.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
|
- else
|
||||||
%br
|
%br
|
||||||
#recap-info-entreprise
|
#recap-info-entreprise
|
||||||
|
|
|
@ -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 }
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
%div{ style: 'float: right;' }
|
%div{ style: 'float: right;' }
|
||||||
%a.btn{ href: "/users/dossiers/#{@dossier.id}/recapitulatif" } Retour
|
%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 }
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
locals: { champ: champ, form: champ_form, seen_at: @annotations_privees_seen_at }
|
locals: { champ: champ, form: champ_form, seen_at: @annotations_privees_seen_at }
|
||||||
|
|
||||||
.send-wrapper
|
.send-wrapper
|
||||||
= f.submit 'Sauvegarder', class: 'button send', data: { disable_with: "Envoi..." }
|
= f.submit 'Sauvegarder', class: 'button send', data: { disable: true }
|
||||||
|
|
||||||
- else
|
- else
|
||||||
%h2.empty-text Aucune annotation privée
|
%h2.empty-text Aucune annotation privée
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
(taille max : 20 Mo)
|
(taille max : 20 Mo)
|
||||||
|
|
||||||
.send-wrapper
|
.send-wrapper
|
||||||
= f.submit 'Envoyer', class: 'button send', data: { disable_with: "Envoi…" }
|
= f.submit 'Envoyer', class: 'button send', data: { disable: true }
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
= link_to ask_deletion_dossier_path(dossier),
|
= link_to ask_deletion_dossier_path(dossier),
|
||||||
method: :post,
|
method: :post,
|
||||||
class: 'button danger',
|
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
|
Supprimer le brouillon
|
||||||
|
|
||||||
= f.button 'Enregistrer le brouillon',
|
= f.button 'Enregistrer le brouillon',
|
||||||
|
@ -72,18 +72,18 @@
|
||||||
name: :save_draft,
|
name: :save_draft,
|
||||||
value: true,
|
value: true,
|
||||||
class: 'button send secondary',
|
class: 'button send secondary',
|
||||||
data: { disable_with: 'Enregistrer le brouillon' }
|
data: { disable: true }
|
||||||
|
|
||||||
- if dossier.can_transition_to_en_construction?
|
- if dossier.can_transition_to_en_construction?
|
||||||
= f.button 'Soumettre le dossier',
|
= f.button 'Soumettre le dossier',
|
||||||
class: 'button send primary',
|
class: 'button send primary',
|
||||||
disabled: !current_user.owns?(dossier),
|
disabled: !current_user.owns?(dossier),
|
||||||
data: { disable_with: 'Soumettre le dossier' }
|
data: { disable: true }
|
||||||
|
|
||||||
- else
|
- else
|
||||||
= f.button 'Enregistrer les modifications du dossier',
|
= f.button 'Enregistrer les modifications du dossier',
|
||||||
class: 'button send primary',
|
class: 'button send primary',
|
||||||
data: { disable_with: 'Enregistrer les modifications du dossier' }
|
data: { disable: true }
|
||||||
|
|
||||||
- if dossier.brouillon? && !current_user.owns?(dossier)
|
- if dossier.brouillon? && !current_user.owns?(dossier)
|
||||||
.send-notice.invite-cannot-submit
|
.send-notice.invite-cannot-submit
|
||||||
|
|
|
@ -14,4 +14,4 @@
|
||||||
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
||||||
|
|
||||||
.modal-footer
|
.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 }
|
||||||
|
|
|
@ -13,5 +13,5 @@
|
||||||
.form-group.form-group-lg
|
.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
|
= 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
|
%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' }
|
%input{ type: 'hidden', value: "#{@procedure.id}", name: 'procedure_id', id: 'procedure_id' }
|
||||||
|
|
Loading…
Add table
Reference in a new issue