]> git.andy128k.dev Git - ipf.git/commitdiff
cleanup
authorAndrey Kutejko <aku@anahoret.com>
Tue, 26 Aug 2014 15:03:10 +0000 (18:03 +0300)
committerAndrey Kutejko <aku@anahoret.com>
Tue, 26 Aug 2014 15:03:10 +0000 (18:03 +0300)
ipf/form.php
ipf/form/field.php
ipf/form/fieldproxy.php [deleted file]

index a071f386757f2add30de991eaccb6acb282afb7f..39e169b3ab2b4193d224e80121e6d8f42c289ee3 100644 (file)
@@ -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;
     }
 
index 7ce32c9752a6fbaef5efaecaefda6ea90b1f9888..741c1edd9ebf422014854a8f737325f74843ef81 100644 (file)
@@ -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 (file)
index 2a23028..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-class IPF_Form_FieldProxy
-{
-    protected $form = null;
-
-    public function __construct(&$form)
-    {
-        $this->form = $form;
-    }
-
-    public function __get($field)
-    {
-        return new IPF_Form_BoundField($this->form, $this->form->fields[$field], $field);
-    }
-}