Skip to content

Commit

Permalink
Merge branch '6.0/ticket-update-label-value'
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Nov 8, 2024
2 parents 26474d9 + dd65dd9 commit 4af7c30
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 40 deletions.
47 changes: 15 additions & 32 deletions share/html/Ticket/Elements/UpdateCc
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,22 @@
%# END BPS TAGGED BLOCK }}}
% $m->callback(CallbackName => 'BeforeCc', ARGSRef => \%ARGS, Ticket => $TicketObj, one_time_Ccs => \@one_time_Ccs, txn_addresses => \%txn_addresses);

<div class="row mt-2">
<div class="label col-2">
<&|/l&>One-time Cc</&>:
</div>
<div class="value col-9">
<& /Elements/EmailInput, Name => 'UpdateCc', Size => undef, Default => $ARGS{UpdateCc}, AutocompleteMultiple => 1, Options => \@one_time_Ccs &>
<input type="hidden" id="UpdateIgnoreAddressCheckboxes" name="UpdateIgnoreAddressCheckboxes" value="<% $ARGS{UpdateIgnoreAddressCheckboxes} || 0 %>">
</div>
</div>
<&| /Elements/LabeledValue, Label => loc("One-time Cc"), &>
<& /Elements/EmailInput, Name => 'UpdateCc', Size => undef, Default => $ARGS{UpdateCc}, AutocompleteMultiple => 1, Options => \@one_time_Ccs &>
<input type="hidden" id="UpdateIgnoreAddressCheckboxes" name="UpdateIgnoreAddressCheckboxes" value="<% $ARGS{UpdateIgnoreAddressCheckboxes} || 0 %>">
</&>

%if (scalar @one_time_Ccs) {
<div class="row">
<div class="label col-2"></div>
<div class="value col-9">
<div class="row mt-2">
<&| /Elements/LabeledValue, Label => '', &>
<div class="row">
% if ($hide_cc_suggestions) {
<a href="#" class="ToggleSuggestions" data-hide-label="<% $hide_label %>" data-show-label="<% $show_label %>">
<i class="label">(<&|/l&>show suggestions</&>)</i>
</a>
<div class="OneTimeCcs d-flex flex-wrap hidden">
% }

<div class="col-auto"><% GetSVGImage( Name => 'info', Title => loc('Check to add'), Size => 12 ) |n %></div>
<div class="col-auto d-flex align-items-center"><% GetSVGImage( Name => 'info', Title => loc('Check to add'), Size => 12 ) |n %></div>
<div class="col-auto">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="AllSuggestedCc" name="AllSuggestedCc" value="1" onclick="setCheckbox(this, /^UpdateCc-/); checkboxesToInput('UpdateCc', 'input[name^=UpdateCc-]:checkbox');">
Expand Down Expand Up @@ -99,32 +92,23 @@
</div>
% }
</div>
</div>
</div>
</&>
%}

<div class="row mt-2">
<div class="label col-2">
<&|/l&>One-time Bcc</&>:
</div>
<div class="value col-9">
<& /Elements/EmailInput, Name => 'UpdateBcc', Size => undef, Default => $ARGS{UpdateBcc}, AutocompleteMultiple => 1, Options => \@one_time_Ccs &>
</div>
</div>
<&| /Elements/LabeledValue, Label => loc("One-time Bcc"), &>
<& /Elements/EmailInput, Name => 'UpdateBcc', Size => undef, Default => $ARGS{UpdateBcc}, AutocompleteMultiple => 1, Options => \@one_time_Ccs &>
</&>

%if (scalar @one_time_Ccs) {
<div class="row">
<div class="label col-2"></div>
<div class="value col-9">
<div class="row mt-2">
<&| /Elements/LabeledValue, Label => '', &>
<div class="row">
% if ($hide_cc_suggestions) {
<a href="#" class="ToggleSuggestions" data-hide-label="<% $hide_label %>" data-show-label="<% $show_label %>">
<i class="label">(<&|/l&>show suggestions</&>)</i>
</a>
<div class="OneTimeCcs d-flex flex-wrap hidden">
% }

<div class="col-auto"><% GetSVGImage( Name => 'info', Title => loc('Check to add'), Size => 12 ) |n %></div>
<div class="col-auto d-flex align-items-center"><% GetSVGImage( Name => 'info', Title => loc('Check to add'), Size => 12 ) |n %></div>
<div class="col-auto">
<div class="form-check">
<input type="checkbox" class="checkbox form-check-input" id="AllSuggestedBcc" name="AllSuggestedBcc" value="1" onclick="setCheckbox(this, /^UpdateBcc-/); checkboxesToInput('UpdateBcc', 'input[name^=UpdateBcc-]:checkbox');">
Expand Down Expand Up @@ -165,9 +149,8 @@ jQuery(function() {
});
</script>
% }
</div>
</div>
</div>
</&>
%}

<%args>
Expand Down
11 changes: 3 additions & 8 deletions share/html/Ticket/Widgets/Update/Message
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,10 @@
% }
% $m->callback( %ARGS, CallbackName => 'AfterGnuPG' );

<div class="row mt-2">
<div class="label col-2">
<&|/l&>Subject</&>:
</div>
<div class="value col-9">
<input class="form-control" type="text" name="UpdateSubject" value="<% $ARGS{UpdateSubject} || $Ticket->Subject || '' %>" />
<&| /Elements/LabeledValue, Label => loc("Subject"), &>
<input class="form-control" type="text" name="UpdateSubject" value="<% $ARGS{UpdateSubject} || $Ticket->Subject || '' %>" />
% $m->callback( %ARGS, CallbackName => 'AfterSubject' );
</div>
</div>
</&>
<& /Articles/Elements/BeforeMessageBox, %ARGS &>

<div class="messagebox-container action-<% $type %>">
Expand Down

0 comments on commit 4af7c30

Please sign in to comment.