Patches item #518198, was opened at 2002-02-15 14:39
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=403613&aid=518198&group_id=31885
Category: Widget (example)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Erik Norvelle (enorvelle)
Assigned to: Nobody/Anonymous (nobody)
Summary: oc_time control submitted for oohforms
Initial Comment:
The attached file is an instantiation of a time input
control, derived from oc_calendar by Sanisoft.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2002-04-09 01:44
Message:
Logged In: NO
The "extrahtml"-function is not provided in the actual
version of of_time.inc. Replace the following function and
it works:
-----------------
function self_get($val, $which, &$count) {
$str = "";
$count = 2;
$val=trim($val);
if(!empty($val)) {
$this->value = $val;
$val_arr = explode
(":",$val);
$this->hour = (int) $val_arr[0];
$this->min = (int) $val_arr[1];
}
// Generate hour selector
$str = "<select name='" . $this-
>name . "_hour'";
if ($this->extrahtml)
$str .= " $this->extrahtml";
$str.=">";
for ($hour = 0; $hour <= 23; $hour++) {
if ($hour < 10) { $prefix = "0"; }
else { $prefix = ""; }
$str .= "<option
value='$prefix$hour'";
if ($hour == $this->hour) {
$str .= " selected"; }
$str .= ">$prefix$hour";
}
$str .= "</select><b>:</b>";
// Generate minute selector
$str .= "<select name='" . $this-
>name . "_min'";
if ($this->extrahtml)
$str .= " $this->extrahtml";
$str.=">";
for ($min = 0; $min < 60; $min++) {
if ($min < 10) { $prefix = "0"; }
else { $prefix = ""; }
$str .= "<option
value='$prefix$min'";
if ($min == $this->min) { $str .= "
selected"; }
$str .= ">$prefix$min";
}
$str .= "</select>";
//$str .= "<br>$val " . $this->hour . " " . $this->min;
return $str;
}
----------------------------------------------------------------------
Comment By: Dr Tarique Sani (tarique)
Date: 2002-02-15 20:07
Message:
Logged In: YES
user_id=269695
Cool!! and thanks will put it in the next release?!! of
of_cal
BUT of_cal is not a part of PHPlib as yet :-)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=403613&aid=518198&group_id=31885
|