From 8f266c7e75a0c9ee617df702738c89c1504da875 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Tue, 26 Aug 2014 18:03:10 +0300 Subject: [PATCH] cleanup --- ipf/form.php | 7 ------- ipf/form/field.php | 8 -------- ipf/form/fieldproxy.php | 16 ---------------- 3 files changed, 31 deletions(-) delete mode 100644 ipf/form/fieldproxy.php diff --git a/ipf/form.php b/ipf/form.php index a071f38..39e169b 100644 --- a/ipf/form.php +++ b/ipf/form.php @@ -14,9 +14,6 @@ abstract class IPF_Form implements Iterator public $cleaned_data = array(); public $errors = array(); public $is_bound = false; - public $f = null; - public $before_render = ''; - public $after_render = ''; public $label_suffix = ':'; protected $is_valid = null; @@ -29,7 +26,6 @@ abstract class IPF_Form implements Iterator } $this->initial = \PFF\Arr::get($extra, 'initial', array()); $this->initFields($extra); - $this->f = new IPF_Form_FieldProxy($this); } abstract protected function initFields($extra=array()); @@ -94,9 +90,6 @@ abstract class IPF_Form implements Iterator public function clean() { - foreach ($this->fields as $name=>$field) { - $field->LateClean($this->data, $this->cleaned_data); - } return $this->cleaned_data; } diff --git a/ipf/form/field.php b/ipf/form/field.php index 7ce32c9..741c1ed 100644 --- a/ipf/form/field.php +++ b/ipf/form/field.php @@ -2,15 +2,11 @@ class IPF_Form_Field { - public $class = 'IPF_Form_Field'; - public $widget = 'IPF_Form_Widget_TextInput'; public $label = ''; public $required = false; public $help_text = ''; public $choices = null; - - public $hidden_widget = 'IPF_Form_Widget_HiddenInput'; public $value = ''; /**< Current value of the field. */ protected $empty_values = array('', null, array()); @@ -39,10 +35,6 @@ class IPF_Form_Field return $value; } - function LateClean($data, &$cleaned_data) - { - } - protected function createWidget($args) { $widgetClass = $this->widget; diff --git a/ipf/form/fieldproxy.php b/ipf/form/fieldproxy.php deleted file mode 100644 index 2a23028..0000000 --- a/ipf/form/fieldproxy.php +++ /dev/null @@ -1,16 +0,0 @@ -form = $form; - } - - public function __get($field) - { - return new IPF_Form_BoundField($this->form, $this->form->fields[$field], $field); - } -} -- 2.49.0