[Solar-svn] Revision 3124

pmjones at solarphp.com pmjones at solarphp.com
Fri Apr 18 09:07:11 CDT 2008


Solar_Form_Load_Model: [CHG] When a 'validateUpload' filter is present, change the input type to 'file'.


Modified: trunk/Solar/Form/Load/Model.php
===================================================================
--- trunk/Solar/Form/Load/Model.php	2008-04-15 13:09:12 UTC (rev 3123)
+++ trunk/Solar/Form/Load/Model.php	2008-04-18 14:07:01 UTC (rev 3124)
@@ -164,13 +164,19 @@
                         $info['type'] = 'hidden';
                     }
                     
-                    // if there is a filter to 'validateInList' or 'validateInKeys',
-                    // make this a select element.
                     foreach ($filters as $v) {
+                        // if there is a filter to 'validateInList' or
+                        // 'validateInKeys', make this a select element.
                         if ($v[0] == 'validateInKeys' || $v[0] == 'validateInList') {
                             $info['type'] = 'select';
                             break;
                         }
+                        // if there is a filter to 'validateUpload', make this
+                        // a file element
+                        if ($v[0] == 'validateUpload') {
+                            $info['type'] = 'file';
+                            break;
+                        }
                     }
                     
                     // if type is still empty, make it text.




More information about the Solar-svn mailing list