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 30, 2024
1 parent 4b9b6e3 commit 4d4a2d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion share/html/Elements/SelectOwnerDropdown
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
<select name="<%$Name%>" class="selectpicker form-select <%$Name%>" <% $Size ? qq{data-size="$Size"} : '' |n %>>
<select id="rt-owner-select" name="<%$Name%>" class="selectpicker form-select <%$Name%>" <% $Size ? qq{data-size="$Size"} : '' |n %>>
%if ($DefaultValue) {
<option value=""<% !$Default ? qq[ selected="selected"] : '' |n %>><%$DefaultLabel |n%></option>
%}
Expand Down
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 4d4a2d7

Please sign in to comment.