X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fform%2FActionForm.class.php;h=edc15708d28a89d63e917bb58fe5b81c6606e793;hb=60d2288b7fca6caf0f5d9d3eee972f040eb24fb0;hp=186f968a93642440d824db419d3d4db144912ce0;hpb=8e115dc0b3f4ee266a09f762084e3495726ac6dd;p=timetracker.git diff --git a/WEB-INF/lib/form/ActionForm.class.php b/WEB-INF/lib/form/ActionForm.class.php index 186f968a..edc15708 100644 --- a/WEB-INF/lib/form/ActionForm.class.php +++ b/WEB-INF/lib/form/ActionForm.class.php @@ -38,7 +38,6 @@ class ActionForm { function __construct($name, &$form, $request=null) { $this->setName($name); - $form->setRequest($request); $this->setForm($form); //if ($request) $this->initAttributes($request); $this->initAttributes($request); @@ -63,8 +62,8 @@ class ActionForm { } function setName($name) { - $this->mName = $name; - $this->mSessionCell = "formbean_".$this->mName; + $this->name = $name; + $this->mSessionCell = "formbean_".$this->name; } /** @@ -73,7 +72,6 @@ class ActionForm { * @param object $request */ function initAttributes(&$request) { - //$submit_flag = $this->isSubmit(); $submit_flag = (is_object($request) && ($request->isPost())); if ($submit_flag) { @@ -122,7 +120,7 @@ class ActionForm { $this->mValues[$name] = $value; if ($this->mForm) { if (isset($this->mForm->elements[$name])) { - if ($this->mForm->elements[$name]->cClassName=="DateField") { + if ($this->mForm->elements[$name]->class=="DateField") { $dt = new DateAndTime($user->date_format, $value); $value = $dt->toString(DB_DATEFORMAT); } @@ -151,7 +149,7 @@ class ActionForm { foreach ($this->mValues as $name=>$value) { if ($this->mForm) { if (isset($this->mForm->elements[$name])) { - if ($this->mForm->elements[$name]->cClassName=="DateField") { + if ($this->mForm->elements[$name]->class=="DateField") { $dt = new DateAndTime($user->date_format, $value); $value = $dt->toString(DB_DATEFORMAT); } @@ -165,14 +163,6 @@ class ActionForm { print_r($this->mValues); } - function isSubmit() { - $res = false; - if (is_object($this->mForm)) { - $res = $this->mForm->isSubmit(); - } - return $res; - } - function saveBean() { if ($this->mForm) { $elements = $this->mForm->getElements(); @@ -196,7 +186,7 @@ class ActionForm { import('form.'.$ref_el["class"]); $class_name = $ref_el["class"]; $el = new $class_name($ref_el["name"]); - if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]); + if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]); $el->setValueSafe(@$_SESSION[$this->mSessionCell . "_" .$el->getName()]); if ($this->mForm && !isset($this->mForm->elements[$ref_el["name"]])) {