projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed ttReportHelper::groupingBy function.
[timetracker.git]
/
WEB-INF
/
lib
/
form
/
ActionForm.class.php
diff --git
a/WEB-INF/lib/form/ActionForm.class.php
b/WEB-INF/lib/form/ActionForm.class.php
index
186f968
..
97c9219
100644
(file)
--- 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);
function __construct($name, &$form, $request=null) {
$this->setName($name);
- $form->setRequest($request);
$this->setForm($form);
//if ($request) $this->initAttributes($request);
$this->initAttributes($request);
$this->setForm($form);
//if ($request) $this->initAttributes($request);
$this->initAttributes($request);
@@
-63,8
+62,8
@@
class ActionForm {
}
function setName($name) {
}
function setName($name) {
- $this->
mN
ame = $name;
- $this->mSessionCell = "formbean_".$this->
mN
ame;
+ $this->
n
ame = $name;
+ $this->mSessionCell = "formbean_".$this->
n
ame;
}
/**
}
/**
@@
-73,7
+72,6
@@
class ActionForm {
* @param object $request
*/
function initAttributes(&$request) {
* @param object $request
*/
function initAttributes(&$request) {
- //$submit_flag = $this->isSubmit();
$submit_flag = (is_object($request) && ($request->isPost()));
if ($submit_flag) {
$submit_flag = (is_object($request) && ($request->isPost()));
if ($submit_flag) {
@@
-101,17
+99,7
@@
class ActionForm {
$this->mInitForm = true;
}
}
$this->mInitForm = true;
}
}
-
- /**
- * Init custom variables
- *
- * @param unknown $request
- * @param unknown $respons
- */
- function initVariables(&$request, &$respons) {
-
- }
-
+
function setVariablesNames($namelist) {
$this->mVariables = $namelist;
}
function setVariablesNames($namelist) {
$this->mVariables = $namelist;
}
@@
-122,7
+110,7
@@
class ActionForm {
$this->mValues[$name] = $value;
if ($this->mForm) {
if (isset($this->mForm->elements[$name])) {
$this->mValues[$name] = $value;
if ($this->mForm) {
if (isset($this->mForm->elements[$name])) {
- if ($this->mForm->elements[$name]->c
ClassName
=="DateField") {
+ if ($this->mForm->elements[$name]->c
lass
=="DateField") {
$dt = new DateAndTime($user->date_format, $value);
$value = $dt->toString(DB_DATEFORMAT);
}
$dt = new DateAndTime($user->date_format, $value);
$value = $dt->toString(DB_DATEFORMAT);
}
@@
-151,7
+139,7
@@
class ActionForm {
foreach ($this->mValues as $name=>$value) {
if ($this->mForm) {
if (isset($this->mForm->elements[$name])) {
foreach ($this->mValues as $name=>$value) {
if ($this->mForm) {
if (isset($this->mForm->elements[$name])) {
- if ($this->mForm->elements[$name]->c
ClassName
=="DateField") {
+ if ($this->mForm->elements[$name]->c
lass
=="DateField") {
$dt = new DateAndTime($user->date_format, $value);
$value = $dt->toString(DB_DATEFORMAT);
}
$dt = new DateAndTime($user->date_format, $value);
$value = $dt->toString(DB_DATEFORMAT);
}
@@
-165,14
+153,6
@@
class ActionForm {
print_r($this->mValues);
}
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();
function saveBean() {
if ($this->mForm) {
$elements = $this->mForm->getElements();
@@
-196,7
+176,7
@@
class ActionForm {
import('form.'.$ref_el["class"]);
$class_name = $ref_el["class"];
$el = new $class_name($ref_el["name"]);
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"]
);
+
$el->localize(
);
$el->setValueSafe(@$_SESSION[$this->mSessionCell . "_" .$el->getName()]);
if ($this->mForm && !isset($this->mForm->elements[$ref_el["name"]])) {
$el->setValueSafe(@$_SESSION[$this->mSessionCell . "_" .$el->getName()]);
if ($this->mForm && !isset($this->mForm->elements[$ref_el["name"]])) {