From 3a5964df63eb410b66e02326ebc7f7c90e8d606e Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 1 Mar 2017 18:25:57 +0000 Subject: [PATCH] Further refactoring of the FormElement class to simplify things. --- WEB-INF/lib/form/CheckboxCellRenderer.class.php | 2 +- WEB-INF/lib/form/CheckboxGroup.class.php | 6 +++--- WEB-INF/lib/form/Form.class.php | 2 +- WEB-INF/lib/form/FormElement.class.php | 6 ++---- WEB-INF/lib/form/Table.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- user_add.php | 2 +- user_edit.php | 2 +- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/WEB-INF/lib/form/CheckboxCellRenderer.class.php b/WEB-INF/lib/form/CheckboxCellRenderer.class.php index 8ebfd6db..d117c12e 100644 --- a/WEB-INF/lib/form/CheckboxCellRenderer.class.php +++ b/WEB-INF/lib/form/CheckboxCellRenderer.class.php @@ -33,7 +33,7 @@ class CheckboxCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { $html = 'mWidth!='' ? ' width="'.$this->mWidth.'"' : ''); - $html .= ">getName()."[]\" id=\"".$table->getName()."_".$row."\" type=\"checkbox\" value=\"".$value."\""; + $html .= ">name."[]\" id=\"".$table->name."_".$row."\" type=\"checkbox\" value=\"".$value."\""; if($this->getOnChangeAdd()) { $html .= " onclick=\"".$this->getOnChangeAdd()."\""; } diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php index bbb7135b..9f5cc053 100644 --- a/WEB-INF/lib/form/CheckboxGroup.class.php +++ b/WEB-INF/lib/form/CheckboxGroup.class.php @@ -132,7 +132,7 @@ class CheckboxGroup extends FormElement { $html = "\n\tstyle."\">\n"; $html .= "
\n"; - $html .= ''.$this->lSelAll.' / '.$this->lSelNone.''; + $html .= ''.$this->lSelAll.' / '.$this->lSelNone.''; $html .= "
"; $html .= "\n\t\n"; @@ -147,10 +147,10 @@ class CheckboxGroup extends FormElement { $html .= "
\n"; $str = "