--- loncom/interface/lonhtmlcommon.pm 2010/12/02 13:47:17 1.253.2.7 +++ loncom/interface/lonhtmlcommon.pm 2009/12/22 06:02:44 1.256 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.253.2.7 2010/12/02 13:47:17 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.256 2009/12/22 06:02:44 faziophi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -410,7 +410,7 @@ The method used to restrict user input w ############################################## sub date_setter { my ($formname,$dname,$currentvalue,$special,$includeempty,$state, - $no_hh_mm_ss,$defhour,$defmin,$defsec,$nolink,$hide_timezone) = @_; + $no_hh_mm_ss,$defhour,$defmin,$defsec,$nolink) = @_; my $now = time; my $wasdefined=1; if (! defined($state) || $state ne 'disabled') { @@ -563,10 +563,7 @@ ENDJS $cal_link = qq{}; } # - my $tzone; - unless ($hide_timezone) { - $tzone = ' '.$tzname.' '; - } + my $tzone = ' '.$tzname.' '; if ($no_hh_mm_ss) { $result .= &mt('[_1] [_2] [_3] ', $monthselector,$dayselector,$yearselector). @@ -646,7 +643,7 @@ Returns: Unix time represented in the fo ############################################## ############################################## sub get_date_from_form { - my ($dname,$timezone) = @_; + my ($dname) = @_; my ($sec,$min,$hour,$day,$month,$year); # if (defined($env{'form.'.$dname.'_second'})) { @@ -696,13 +693,7 @@ sub get_date_from_form { if (($year<1970) || ($year>2037)) { return undef; } if (defined($sec) && defined($min) && defined($hour) && defined($day) && defined($month) && defined($year)) { - if (defined($timezone)) { - if (&Apache::lonlocal::gettimezone($timezone) eq 'local') { - $timezone = &Apache::lonlocal::gettimezone(); - } - } else { - $timezone = &Apache::lonlocal::gettimezone(); - } + my $timezone = &Apache::lonlocal::gettimezone(); my $dt = DateTime->new( year => $year, month => $month, day => $day, @@ -1250,11 +1241,18 @@ ENDLINK } sub htmlareaheaders { - return if (&htmlareablocked()); - return if (!&htmlareabrowser()); - return (< -ENDHEADERS + +ENDEDITOR + } + $s.=(< + +ENDJQUERY + return $s; } # ----------------------------------------------------------------- Preferences @@ -1293,16 +1291,98 @@ sub htmlareaselectactive { my $output='