Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.253.2.5 and 1.253.2.8

version 1.253.2.5, 2010/11/08 23:27:58 version 1.253.2.8, 2010/12/05 21:58:49
Line 410  The method used to restrict user input w Line 410  The method used to restrict user input w
 ##############################################  ##############################################
 sub date_setter {  sub date_setter {
     my ($formname,$dname,$currentvalue,$special,$includeempty,$state,      my ($formname,$dname,$currentvalue,$special,$includeempty,$state,
         $no_hh_mm_ss,$defhour,$defmin,$defsec,$nolink) = @_;          $no_hh_mm_ss,$defhour,$defmin,$defsec,$nolink,$hide_timezone) = @_;
     my $now = time;      my $now = time;
     my $wasdefined=1;      my $wasdefined=1;
     if (! defined($state) || $state ne 'disabled') {      if (! defined($state) || $state ne 'disabled') {
Line 563  ENDJS Line 563  ENDJS
         $cal_link = qq{<a href="javascript:$dname\_opencalendar()">};          $cal_link = qq{<a href="javascript:$dname\_opencalendar()">};
     }      }
     #      #
     my $tzone = ' '.$tzname.' ';      my $tzone;
       unless ($hide_timezone) {
           $tzone = ' '.$tzname.' ';
       }
     if ($no_hh_mm_ss) {      if ($no_hh_mm_ss) {
         $result .= &mt('[_1] [_2] [_3] ',          $result .= &mt('[_1] [_2] [_3] ',
                        $monthselector,$dayselector,$yearselector).                         $monthselector,$dayselector,$yearselector).
Line 643  Returns: Unix time represented in the fo Line 646  Returns: Unix time represented in the fo
 ##############################################  ##############################################
 ##############################################  ##############################################
 sub get_date_from_form {  sub get_date_from_form {
     my ($dname) = @_;      my ($dname,$timezone) = @_;
     my ($sec,$min,$hour,$day,$month,$year);      my ($sec,$min,$hour,$day,$month,$year);
     #      #
     if (defined($env{'form.'.$dname.'_second'})) {      if (defined($env{'form.'.$dname.'_second'})) {
Line 693  sub get_date_from_form { Line 696  sub get_date_from_form {
     if (($year<1970) || ($year>2037)) { return undef; }      if (($year<1970) || ($year>2037)) { return undef; }
     if (defined($sec) && defined($min)   && defined($hour) &&      if (defined($sec) && defined($min)   && defined($hour) &&
         defined($day) && defined($month) && defined($year)) {          defined($day) && defined($month) && defined($year)) {
         my $timezone = &Apache::lonlocal::gettimezone();          if (defined($timezone)) {
               if (&Apache::lonlocal::gettimezone($timezone) eq 'local') {
                   $timezone = &Apache::lonlocal::gettimezone();
               }
           } else {
               $timezone = &Apache::lonlocal::gettimezone();
           }
         my $dt = DateTime->new( year   => $year,          my $dt = DateTime->new( year   => $year,
                                 month  => $month,                                  month  => $month,
                                 day    => $day,                                  day    => $day,
Line 1388  returns: nothing Line 1397  returns: nothing
                 if ((exists($env{'request.course.id'})) &&                  if ((exists($env{'request.course.id'})) &&
                     ($env{'request.course.id'} ne '') &&                       ($env{'request.course.id'} ne '') && 
                     !($env{'form.context'} eq 'requestcrs')) {                      !($env{'form.context'} eq 'requestcrs')) {
                     if ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} eq 'gcitest')) {                      if ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} =~ /^\w+citest$/)) {
                         if ($env{'environment.remotenavmap'} eq 'on') {                          if ($env{'environment.remotenavmap'} eq 'on') {
                             # open link using javascript when remote navmap is activated                              # open link using javascript when remote navmap is activated
                             $href = "javascript:gonav('/adm/navmaps');";                              $href = "javascript:gonav('/adm/navmaps');";

Removed from v.1.253.2.5  
changed lines
  Added in v.1.253.2.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>