From f46c9ed67a0d771216210729a24878a75931853d Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 13 Aug 2013 14:34:43 -0700 Subject: fix WillResolve date fallout from #23309 --- rt/lib/RT/Interface/Web_Vendor.pm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm index 7a4804bf9..023dede8f 100644 --- a/rt/lib/RT/Interface/Web_Vendor.pm +++ b/rt/lib/RT/Interface/Web_Vendor.pm @@ -257,17 +257,18 @@ sub ProcessTicketBasics { WillResolve ); -# causes endless redirect loops and "WillResolve changed from Not set to Not set" on ticket view? -# # the UI for editing WillResolve through Ticket Basics should allow -# # setting it to null -# my $to_date = delete($ARGSRef->{'WillResolve_Date'}); -# my $DateObj = RT::Date->new($session{'CurrentUser'}); -# if ( $to_date ) { -# $DateObj->Set(Format => 'unknown', Value => $to_date); -# } else { -# $DateObj->Set(Value => 0); -# } -# $ARGSRef->{'WillResolve'} = $DateObj->ISO; + # the UI for editing WillResolve through Ticket Basics should allow + # setting it to null + if ( exists $ARGSRef->{'WillResolve_Date'} ) { + my $to_date = delete($ARGSRef->{'WillResolve_Date'}); + my $DateObj = RT::Date->new($session{'CurrentUser'}); + if ( $to_date ) { + $DateObj->Set(Format => 'unknown', Value => $to_date); + } else { + $DateObj->Set(Value => 0); + } + $ARGSRef->{'WillResolve'} = $DateObj->ISO; + } if ( $ARGSRef->{'Queue'} and ( $ARGSRef->{'Queue'} !~ /^(\d+)$/ ) ) { my $tempqueue = RT::Queue->new($RT::SystemUser); -- cgit v1.2.1 From 6924a1488d0ec5e64f2dc5a7f9b927464515c068 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 15 Aug 2013 00:13:56 -0700 Subject: fix some UI issues with the report class bulk edit, #24070 --- httemplate/edit/bulk-part_pkg.html | 16 ++++----- httemplate/edit/process/bulk-part_pkg.html | 23 +++++++----- httemplate/elements/checkbox-tristate.html | 57 ++++++++++++++++++++++-------- 3 files changed, 64 insertions(+), 32 deletions(-) diff --git a/httemplate/edit/bulk-part_pkg.html b/httemplate/edit/bulk-part_pkg.html index a1c6f0c9b..1773c9a8b 100644 --- a/httemplate/edit/bulk-part_pkg.html +++ b/httemplate/edit/bulk-part_pkg.html @@ -22,15 +22,12 @@ The following packages will be changed:
% foreach my $num (sort keys %report_class) { -% if ( defined $initial_state{$num} ) { - <& /elements/checkbox.html, - field => 'report_option_'.$num, - value => 1, - curr_value => $initial_state{$num} - &> -% } else { +% if ( $initial_state{$num} == -1 ) { % # needs to be a tristate so that you can say "don't change it" <& /elements/checkbox-tristate.html, field => 'report_option_'.$num &> +% } else { +%# for visual consistency + >