Prevent further clicks on submit buttons
This commit is contained in:
parent
f978455642
commit
ecb551e18d
3 changed files with 21 additions and 0 deletions
13
app/assets/javascripts/action_btn_rules.js
Normal file
13
app/assets/javascripts/action_btn_rules.js
Normal 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();
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@
|
|||
.file {
|
||||
padding-right: 70px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
.link {
|
||||
span {
|
||||
width: 100%;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue