Skip to content

Commit

Permalink
Disable hx requests for inline edit toggle buttons
Browse files Browse the repository at this point in the history
These buttons show inline edit forms and don't interact with servers. Htmx
doesn't boost cancel buttons as the href is "#", so no need to explicitly
disable them.
  • Loading branch information
sunnavy committed Jan 17, 2024
1 parent a4b1e79 commit ebd0a72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion share/html/Elements/ShowCustomFieldCustomGroupings
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for my $group ( @Groupings ) {

my $modify_url = $title_href ? "$title_href?id=".$Object->id.($group?";Grouping=".$m->interp->apply_escapes($group,'u')."#".CSSClass("$css_class-$group") : "#".$css_class) : undef;
my $modify_inline
= '<a class="inline-edit-toggle edit" href="'
= '<a hx-boost="false" class="inline-edit-toggle edit" href="'
. $m->interp->apply_escapes( ( $modify_url || '#' ), 'h' ) . '">'
. qq{<span class="fas fa-pencil-alt icon-bordered fa-2x" alt="$edit_label" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="$edit_label"></span>}
. '</a>'
Expand Down
2 changes: 1 addition & 1 deletion share/html/Ticket/Elements/ShowSummary
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<%PERL>
my $modify_url = RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id;
my $modify_inline
= '<a class="inline-edit-toggle edit" href="%s">'
= '<a hx-boost="false" class="inline-edit-toggle edit" href="%s">'
. qq{<span class="fas fa-pencil-alt icon-bordered fa-2x" alt="$edit_label" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="$edit_label"></span>}
. '</a>'
. '<a class="inline-edit-toggle cancel hidden" href="#">'
Expand Down

0 comments on commit ebd0a72

Please sign in to comment.