Skip to content

Commit

Permalink
fix js click pulsanti in form
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Nov 20, 2023
1 parent 03cb11e commit 0c64824
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/public/js/gasdotto.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/public/js/gasdotto.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/gasdotto.js": "/js/gasdotto.js?id=ffb71a116208cc7710116633bc9eec88",
"/js/gasdotto.js": "/js/gasdotto.js?id=a09d9e89336a27cced111ddfd20c181f",
"/css/gasdotto.css": "/css/gasdotto.css?id=997e46c44b439912f20b9c87e677eb7b"
}
4 changes: 4 additions & 0 deletions code/resources/assets/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class Utils {
this.reviewRequired($(e.currentTarget).closest('form'));
});

$('.prevent-default', container).click(function(e) {
e.preventDefault();
});

$('.link-button', container).click(function(e) {
e.preventDefault();
var url = $(this).attr('data-link');
Expand Down
2 changes: 1 addition & 1 deletion code/resources/views/user/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$friend_admin_buttons = [
[
'label' => _i('Modifica Amico'),
'classes' => ['float-start'],
'classes' => ['float-start', 'prevent-default'],
'attributes' => ['data-bs-toggle' => 'modal', 'data-bs-target' => '#change_friend_' . $user->id]
]
];
Expand Down

0 comments on commit 0c64824

Please sign in to comment.