version 1.105, 2005/05/28 00:35:47
|
version 1.107, 2005/06/06 15:54:28
|
Line 259 The method used to restrict user input w
|
Line 259 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) = @_; |
$no_hh_mm_ss) = @_; |
|
my $wasdefined=1; |
if (! defined($state) || $state ne 'disabled') { |
if (! defined($state) || $state ne 'disabled') { |
$state = ''; |
$state = ''; |
} |
} |
Line 268 sub date_setter {
|
Line 269 sub date_setter {
|
if (! defined($currentvalue) || $currentvalue eq 'now') { |
if (! defined($currentvalue) || $currentvalue eq 'now') { |
unless ($includeempty) { |
unless ($includeempty) { |
$currentvalue = time; |
$currentvalue = time; |
|
$wasdefined=0; |
} else { |
} else { |
$currentvalue = 0; |
$currentvalue = 0; |
} |
} |
Line 279 sub date_setter {
|
Line 281 sub date_setter {
|
localtime($currentvalue); |
localtime($currentvalue); |
$year += 1900; |
$year += 1900; |
} |
} |
|
unless ($wasdefined) { |
|
$sec=0; |
|
$min=0; |
|
} |
my $result = "\n<!-- $dname date setting form -->\n"; |
my $result = "\n<!-- $dname date setting form -->\n"; |
$result .= <<ENDJS; |
$result .= <<ENDJS; |
<script language="Javascript"> |
<script language="Javascript"> |
Line 1112 returns: nothing
|
Line 1118 returns: nothing
|
# Make the faq and bug data cascade |
# Make the faq and bug data cascade |
my $faq = ''; |
my $faq = ''; |
my $bug = ''; |
my $bug = ''; |
|
my $help=''; |
# The last breadcrumb does not have a link, so handle it separately. |
# The last breadcrumb does not have a link, so handle it separately. |
my $last = pop(@Crumbs); |
my $last = pop(@Crumbs); |
# |
# |
Line 1136 returns: nothing
|
Line 1143 returns: nothing
|
map { |
map { |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
|
$help = $_->{'help'} if (exists($_->{'help'})); |
my $result = '<a href="'.$_->{'href'}.'" '; |
my $result = '<a href="'.$_->{'href'}.'" '; |
if (defined($_->{'target'}) && $_->{'target'} ne '') { |
if (defined($_->{'target'}) && $_->{'target'} ne '') { |
$result .= 'target="'.$_->{'target'}.'" '; |
$result .= 'target="'.$_->{'target'}.'" '; |
Line 1151 returns: nothing
|
Line 1159 returns: nothing
|
my $icons = ''; |
my $icons = ''; |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
|
$help = $last->{'help'} if (exists($last->{'help'})); |
|
$component_help=($component_help?$component_help:$help); |
# if ($faq ne '') { |
# if ($faq ne '') { |
# $icons .= &Apache::loncommon::help_open_faq($faq); |
# $icons .= &Apache::loncommon::help_open_faq($faq); |
# } |
# } |