ASNMTAP

 view release on metacpan or  search on metacpan

applications/htmlroot/cgi-bin/admin/timeperiods.pl  view on Meta::CPAN

      return false;
    } else if ( ! objectRegularExpressionTimeValue.test(document.timeperiods.tuesday.value) ) {
      document.timeperiods.tuesday.focus();
      alert('Please re-enter tuesday time: Bad time value!');
      return false;
    }
  }

  if ( document.timeperiods.wednesday.value != null && document.timeperiods.wednesday.value != '' ) {
    if ( ! objectRegularExpressionTimeFormat.test(document.timeperiods.wednesday.value) ) {
      document.timeperiods.wednesday.focus();
      alert('Please re-enter wednesday time: Bad time format!');
      return false;
    } else if ( ! objectRegularExpressionTimeValue.test(document.timeperiods.wednesday.value) ) {
      document.timeperiods.wednesday.focus();
      alert('Please re-enter wednesday time: Bad time value!');
      return false;
    }
  }

  if ( document.timeperiods.thursday.value != null && document.timeperiods.thursday.value != '' ) {
    if ( ! objectRegularExpressionTimeFormat.test(document.timeperiods.thursday.value) ) {
      document.timeperiods.thursday.focus();
      alert('Please re-enter thursday time: Bad time format!');
      return false;
    } else if ( ! objectRegularExpressionTimeValue.test(document.timeperiods.thursday.value) ) {
      document.timeperiods.thursday.focus();
      alert('Please re-enter thursday time: Bad time value!');
      return false;
    }
  }

  if ( document.timeperiods.friday.value != null && document.timeperiods.friday.value != '' ) {
    if ( ! objectRegularExpressionTimeFormat.test(document.timeperiods.friday.value) ) {
      document.timeperiods.friday.focus();
      alert('Please re-enter friday time: Bad time format!');
      return false;
    } else if ( ! objectRegularExpressionTimeValue.test(document.timeperiods.friday.value) ) {
      document.timeperiods.friday.focus();
      alert('Please re-enter friday time: Bad time value!');
      return false;
    }
  }

  if ( document.timeperiods.saturday.value != null && document.timeperiods.saturday.value != '' ) {
    if ( ! objectRegularExpressionTimeFormat.test(document.timeperiods.saturday.value) ) {
      document.timeperiods.saturday.focus();
      alert('Please re-enter saturday time: Bad time format!');
      return false;
    } else if ( ! objectRegularExpressionTimeValue.test(document.timeperiods.saturday.value) ) {
      document.timeperiods.saturday.focus();
      alert('Please re-enter saturday time: Bad time value!');
      return false;
    }
  }

  return true;
}
</script>

<form action="$ENV{SCRIPT_NAME}" method="post" name="timeperiods" onSubmit="return validateForm();">
HTML
    } elsif ($action eq 'listView') {
      print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);

      print <<HTML;
<script language="JavaScript1.2" type="text/javascript">
function submitForm() {
  document.timeperiods.catalogIDreload.value = 1;
  document.timeperiods.submit();
  return true;
}
</script>

<form action="$ENV{SCRIPT_NAME}" method="post" name="timeperiods">
HTML
    } elsif ($action eq 'deleteView') {
      print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
      print "<form action=\"" . $ENV{SCRIPT_NAME} . "\" method=\"post\" name=\"timeperiods\">\n";
      $pageNo = 1; $pageOffset = 0;
    } else {
      print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
    }

    if ($action eq 'deleteView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView' or $action eq 'listView') {
      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">
  <input type="hidden" name="orderBy"         value="$orderBy">
  <input type="hidden" name="catalogIDreload" value="0">
HTML
    } else {
      print "<br>\n";
    }

    print "  <input type=\"hidden\" name=\"catalogID\" value=\"$CcatalogID\">\n  <input type=\"hidden\" name=\"timeperiodID\" value=\"$CtimeperiodID\">\n" if ($formDisabledPrimaryKey ne '' and $action ne 'displayView');

    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 ( $iconAdd ) {
      print <<HTML;
        <td class="StatusItem"><a href="$urlWithAccessParameters&amp;action=insertView&amp;orderBy=$orderBy">[Insert timeperiod]</a></td>
        <td class="StatusItem">&nbsp;&nbsp;&nbsp;</td>
HTML
    }

    print <<HTML;
        <td class="StatusItem"><a href="$urlWithAccessParameters&amp;action=listView&amp;orderBy=$orderBy">[List all timeperiods]</a></td>
	  </tr></table>
	</td></tr>
HTML

    if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
      my $activatedChecked = ($Cactivated eq 'on') ? ' checked' : '';

      print <<HTML;
    <tr><td>&nbsp;</td></tr>
    <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>
        </td></tr><tr><td><b>Timeperiod ID: </b></td><td>
          <input type="text" name="timeperiodID" value="$CtimeperiodID" size="2" maxlength="2" $formDisabledPrimaryKey>
        </td></tr><tr><td><b>Timeperiod Alias: </b></td><td>
          <input type="text" name="timeperiodAlias" value="$CtimeperiodAlias" size="24" maxlength="24" $formDisabledAll>
        </td></tr><tr><td><b>Timeperiod Name: </b></td><td>
          <input type="text" name="timeperiodName" value="$CtimeperiodName" size="64" maxlength="64" $formDisabledAll>
        </td></tr><tr><td><b>Sunday: </b></td><td>
          <input type="text" name="sunday" value="$Csunday" size="36" maxlength="36" $formDisabledAll> format: [00:00-24:00[,00:00-24:00]{0,2}]
        </td></tr><tr><td><b>Monday: </b></td><td>



( run in 1.059 second using v1.01-cache-2.11-cpan-ceb78f64989 )