ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/moderator/comments.pl view on Meta::CPAN
document.comments.suspentionDate.focus();
alert('Please re-enter suspention date: Bad date value!');
return false;
}
}
if ( ( document.comments.suspentionDate.value == '' && document.comments.suspentionTime.value != '' ) || ( document.comments.suspentionDate.value != '' && document.comments.suspentionTime.value == '' ) ) {
if ( document.comments.suspentionDate.value == '' ) {
document.comments.suspentionDate.focus();
alert('Please enter one suspention date!');
} else {
document.comments.suspentionTime.focus();
alert('Please enter one suspention time!');
}
return false;
} else if ( document.comments.suspentionDate.value != '' && document.comments.suspentionTime.value != '' ) {
if ( ! objectRegularExpressionTimeFormat.test(document.comments.suspentionTime.value) ) {
document.comments.suspentionTime.focus();
alert('Please re-enter suspention time: Bad time format!');
return false;
} else if ( ! objectRegularExpressionTimeValue.test(document.comments.suspentionTime.value) ) {
document.comments.suspentionTime.focus();
alert('Please re-enter suspention time: Bad time value!');
return false;
}
}
var suspentionEpochtime = 0;
if ( document.comments.suspentionTime.value != null && document.comments.suspentionTime.value != '' ) {
suspentionDate = document.comments.suspentionDate.value;
suspentionFullYear = suspentionDate.substring(0, 4);
suspentionMonth = suspentionDate.substring(5, 7) - 1;
suspentionDay = suspentionDate.substring(8, 10);
suspentionTime = document.comments.suspentionTime.value;
suspentionHours = suspentionTime.substring(0, 2);
suspentionMinutes = suspentionTime.substring(3, 5);
suspentionSeconds = suspentionTime.substring(6, 8);
suspentionEpochtime = Date.UTC(suspentionFullYear, suspentionMonth, suspentionDay, suspentionHours, suspentionMinutes, suspentionSeconds);
if ( nowEpochtime > suspentionEpochtime ) {
document.comments.suspentionDate.focus();
alert('Please re-enter suspention date/time: Date/Time are into the past!');
return false;
}
}
if ( activationEpochtime != 0 && suspentionEpochtime != 0 ) {
if ( activationEpochtime > suspentionEpochtime ) {
document.comments.activationDate.focus();
alert('Please re-enter activation/suspention date/time: Activation Date/Time > Suspention Date/Time !');
return false;
}
}
return true;
}
</script>
<form action="$ENV{SCRIPT_NAME}" method="post" name="comments" enctype="multipart/form-data" onSubmit="selectAllOptions('selected_id'); return validateForm();">
<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">
<input type="hidden" name="catalogIDreload" value="0">
<input type="hidden" name="environIDreload" value="0">
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">
HTML
if ( $action eq 'insert' and $userType != 0 ) {
print <<HTML;
<tr align="center"><td colspan="2">
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td class="StatusItem"><a href="$urlWithAccessParameters&action=insertView">[Insert comments]</a></td>
<td class="StatusItem"> </td>
</tr></table>
</td></tr>
HTML
}
print "<tr><td colspan=\"2\"> </td></tr>";
if ($action eq 'insertView') {
my $instabilityDisabled = ($userType < 2) ? 'disabled' : '';
my $persistentDisabled = ($userType < 2) ? 'disabled' : '';
my $downtimeDisabled = ($userType < 2) ? 'disabled' : '';
my $instabilityChecked = ($Cinstability eq 'on') ? ' checked' : '';
my $persistentChecked = ($Cpersistent eq 'on') ? ' checked' : '';
my $downtimeChecked = ($Cdowntime eq 'on') ? ' checked' : '';
print <<HTML;
<tr><td><table border="0" cellspacing="0" cellpadding="0">
<tr><td><b>Catalog ID: </b></td><td>
<input type="text" name="catalogID" value="$CcatalogID" size="5" maxlength="5" disabled> $catalogIDSelect
</td></tr>
<tr><td><b>Environment: </b></td><td>
$environmentSelect
</td></tr>
<tr><td valign="top"><b>Applications uKey List: </b></td><td>
<table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">Available:<br>
$unselected_id
</td><td>
<input type="image" src="$IMAGESURL/1moveLeft.png" alt="Move item to left" title="Move item to left" onclick="moveOptions(this.form.selected_id, this.form.unselected_id, false); selectAllOptions('selected_id'); return false;"...
<input type="image" src="$IMAGESURL/1moveRight.png" alt="Move item to right" title="Move item to right" onclick="moveOptions(this.form.unselected_id, this.form.selected_id, false); selectAllOptions('selected_id'); return false;">...
<input type="image" src="$IMAGESURL/2moveLeft.png" alt="Move all items to left" title="Move all items to left" onclick="moveOptions(this.form.selected_id, this.form.unselected_id, true); selectAllOptions('selected_id'); return false;">
<input type="image" src="$IMAGESURL/2moveRight.png" alt="Move all items to right" title="Move all items to right" onclick="moveOptions(this.form.unselected_id, this.form.selected_id, true); selectAllOptions('selected_id'); return false;">...
</td><td valign="top">Selected:<br>
<select name="selected" id="selected_id" size="10" multiple></select>
</td></tr></table>
( run in 0.565 second using v1.01-cache-2.11-cpan-ceb78f64989 )