ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/comments.pl view on Meta::CPAN
}
}
if ( ( document.comments.solvedDate.value == '' && document.comments.solvedTime.value != '' ) || ( document.comments.solvedDate.value != '' && document.comments.solvedTime.value == '' ) ) {
if ( document.comments.solvedDate.value == '' ) {
document.comments.solvedDate.focus();
alert('Please enter one solved date!');
} else {
document.comments.solvedTime.focus();
alert('Please enter one solved time!');
}
return false;
} else if ( document.comments.solvedDate.value != '' && document.comments.solvedTime.value != '' ) {
if ( ! objectRegularExpressionTimeFormat.test(document.comments.solvedTime.value) ) {
document.comments.solvedTime.focus();
alert('Please re-enter solved time: Bad time format!');
return false;
} else if ( ! objectRegularExpressionTimeValue.test(document.comments.solvedTime.value) ) {
document.comments.solvedTime.focus();
alert('Please re-enter solved time: Bad time value!');
return false;
}
}
var solvedEpochtime = 0;
if ( document.comments.solvedTime.value != null && document.comments.solvedTime.value != '' ) {
solvedDate = document.comments.solvedDate.value;
solvedFullYear = solvedDate.substring(0, 4);
solvedMonth = solvedDate.substring(5, 7) - 1;
solvedDay = solvedDate.substring(8, 10);
solvedTime = document.comments.solvedTime.value;
solvedHours = solvedTime.substring(0, 2);
solvedMinutes = solvedTime.substring(3, 5);
solvedSeconds = solvedTime.substring(6, 8);
solvedEpochtime = Date.UTC(solvedFullYear, solvedMonth, solvedDay, solvedHours, solvedMinutes, solvedSeconds);
if ( solvedEpochtime > nowEpochtime) {
document.comments.solvedDate.focus();
alert('Please re-enter solved date/time: Date/Time are into the future!');
return false;
}
}
if ( entryEpochtime != 0 && solvedEpochtime != 0 ) {
if ( entryEpochtime > solvedEpochtime ) {
document.comments.entryDate.focus();
alert('Please re-enter entry/solved date/time: entry Date/Time > solved Date/Time !');
return false;
}
}
HTML
}
print <<HTML;
return true;
}
</script>
<form action="$ENV{SCRIPT_NAME}" method="post" name="comments" onSubmit="return validateForm();">
HTML
} else {
print "<form action=\"$ENV{\"SCRIPT_NAME\"}\" method=\"post\" name=\"comments\">\n";
}
print <<HTML;
<input type="hidden" name="pagedir" value="$pagedir">
<input type="hidden" name="pageset" value="$pageset">
<input type="hidden" name="debug" value="$debug">
<input type="hidden" name="CGISESSID" value="$sessionID">
<input type="hidden" name="pageNo" value="$pageNo">
<input type="hidden" name="pageOffset" value="$pageOffset">
<input type="hidden" name="action" value="$nextAction">
HTML
} else {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
print "<br>\n";
}
print <<HTML;
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center"><td>
<table border="0" cellspacing="0" cellpadding="0"><tr>
HTML
if ( $userType != 0 ) {
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=insertView&catalogID=$CcatalogID&uKey=$CuKey">[Insert comment]</a></td>
<td class="StatusItem"> </td>
HTML
if ( $supportRequest ) {
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=createView&catalogID=$CcatalogID&uKey=$CuKey">[Create support request]</a></td>
<td class="StatusItem"> </td>
HTML
}
}
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=listView&catalogID=$CcatalogID&uKey=$CuKey">[List active comments]</a></td>
<td class="StatusItem"> </td>
<td class="StatusItem"><a href="$urlWithAccessParameters&action=listAllView&catalogID=$CcatalogID&uKey=$CuKey">[List active comments for all plugins]</a></td>
<td class="StatusItem"> </td>
<td class="StatusItem"><a href="$urlWithAccessParameters&action=solvedView&catalogID=$CcatalogID&uKey=$CuKey">[Show solved comments]</a></td>
<td class="StatusItem"> </td>
<td class="StatusItem"><a href="$urlWithAccessParameters&action=historyView&catalogID=$CcatalogID&uKey=$CuKey">[Show history comments]</a></td>
</tr></table>
</td></tr>
<tr><td> </td></tr>
HTML
my $creatviewDisabled = ($action eq 'createView') ? 'disabled' : '';
if ($action eq 'insertView' or $action eq 'createView' or $action eq 'historyView') {
my $instabilityDisabled = ($action eq 'createView' or $userType < 2) ? 'disabled' : '';
my $persistentDisabled = ($action eq 'createView' or $userType < 2) ? 'disabled' : '';
my $downtimeDisabled = ($action eq 'createView') ? 'disabled' : '';
my $instabilityChecked = ($Cinstability eq 'on') ? ' checked' : '';
my $persistentChecked = ($Cpersistent eq 'on') ? ' checked' : '';
my $downtimeChecked = ($Cdowntime eq 'on') ? ' checked' : '';
( run in 0.907 second using v1.01-cache-2.11-cpan-ceb78f64989 )