Skip to content

Commit

Permalink
Convert Owner in Quick Create to a full owner list
Browse files Browse the repository at this point in the history
Previously the Owner dropdown in Quick Create showed only
the current user and Nobody. Replace this with the default
Owner select that loads based on the selected queue.
  • Loading branch information
cbrandtbuffalo committed Dec 20, 2024
1 parent 4b9b6e3 commit 048bfed
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions share/html/Views/Component/QuickCreate
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,9 @@
</&>
</div>
<div class="col-6">
<&| /Elements/LabeledValue, Label => loc("Owner"), Class => 'input-row' &>
<select type="select" name="Owner" class="form-select selectpicker">
% my $default_owner = $args->{Owner} || $session{'CurrentUser'}->id;
<option value="<%$session{'CurrentUser'}->id%>" <% $default_owner == $session{'CurrentUser'}->id ? 'selected="selected"' : '' |n %>><&|/l&>Me</&></option>
<option value="<%RT->Nobody->id%>" <% $default_owner == RT->Nobody->id ? 'selected="selected"' : '' |n %>><%loc('Nobody')%></option>
</select>
<&| /Elements/LabeledValue, Label => loc('Owner'), LabelFor => 'rt-owner-select' &>
<& /Elements/SelectOwner, Name => 'Owner', QueueObj => $QueueObj, Default => $default_owner, DefaultValue => 0 &>
</&>
</div>
</div>
Expand Down

0 comments on commit 048bfed

Please sign in to comment.