From fc0c807901e858f448aa0ddde0f398dc2591b48d Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 13 Nov 2013 11:05:32 +1300 Subject: [PATCH] Bug 11240: ensure that date of restriction is saved when using patron edit screen To test: 1/ Edit a patron 2/ Add a restriction with a date (in any format other than iso) 3/ Note the date is not saved 4/ Apply patch 5/ Add restriction again, note it is saved The problem is output_pref was being called with the wrong parameters Signed-off-by: Jonathan Druart Note: The issue in on the memberentry form only (not the restriction form on the check out page). Signed-off-by: Brendan Gallagher Signed-off-by: Galen Charlton --- members/memberentry.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 4b410a7036..e7f07a9265 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -104,7 +104,11 @@ foreach my $d ( @debarments_to_remove ) { if ( $input->param('add_debarment') ) { my $expiration = $input->param('debarred_expiration'); - $expiration = $expiration ? output_pref( dt_from_string($expiration), 'iso' ) : undef; + $expiration = + $expiration + ? output_pref( + { 'dt' => dt_from_string($expiration), 'dateformat' => 'iso' } ) + : undef; AddUniqueDebarment( { -- 2.39.5