Prevent further clicks on submit buttons

This commit is contained in:
JC 2016-11-25 15:29:09 +01:00
parent f978455642
commit ecb551e18d
3 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,13 @@
$(document).on('page:load', init_action_btn_rules);
$(document).ready(init_action_btn_rules);
function init_action_btn_rules() {
$('.btn-send').click(function () {
$(this).addClass("disabled");
this.addEventListener("click", lock_btn);
});
function lock_btn(event) {
event.preventDefault();
}
}

View file

@ -33,6 +33,7 @@
.file {
padding-right: 70px;
text-align: center;
margin-bottom: 20px;
.link {
span {
width: 100%;

View file

@ -31,6 +31,13 @@
.row
%div.col-lg-12.col-md-12.content
= last_comment.body.html_safe
- if file = last_comment.piece_justificative
.row
%div.col-lg-12.col-md-12.file
= link_to file.content_url, class: 'link', target: '_blank' do
%span.fa.fa-file
%div
= file.original_filename
.row
.col-lg-12.col-md-12
%div.new-action