[Rt-commit] rt branch 5.0/fix-select-status-active-inactive created. rt-5.0.3-345-g9db61f279e

BPS Git Server git at git.bestpractical.com
Thu Mar 30 19:33:07 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/fix-select-status-active-inactive has been created
        at  9db61f279e5b27c4a0e66fd0acf1165fd999bc85 (commit)

- Log -----------------------------------------------------------------
commit 9db61f279e5b27c4a0e66fd0acf1165fd999bc85
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Mar 30 15:21:37 2023 -0300

    Fix SelectStatus element to pre select active/inactive status
    
    Element did not pre select active/inactive status when submitting a
    form with __Active__ or __Inactive__ value selected.

diff --git a/share/html/Elements/SelectStatus b/share/html/Elements/SelectStatus
index 3a78900fbd..ce352151c6 100644
--- a/share/html/Elements/SelectStatus
+++ b/share/html/Elements/SelectStatus
@@ -50,8 +50,12 @@
 <option value=""<% !$Default && qq[ selected="selected"] |n %>><% $DefaultLabel %></option>
 % }
 % if ( $ShowActiveInactive ) {
-<option value="__Active__"><% loc('Active') %></option>
-<option value="__Inactive__"><% loc('Inactive') %></option>
+<option value="__Active__"
+    <% defined $Default && '__Active__' eq $Default ? 'selected="selected"' : '' %>
+><% loc('Active') %></option>
+<option value="__Inactive__"
+    <% defined $Default && '__Inactive__' eq $Default ? 'selected="selected"' : '' %>
+><% loc('Inactive') %></option>
 % }
 % for my $lifecycle (sort keys %statuses_by_lifecycle) {
 %     if ($group_by_lifecycle) {

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list