[Solar-svn] Revision 3016

pmjones at solarphp.com pmjones at solarphp.com
Tue Mar 18 07:30:42 CDT 2008


Solar_View_Helper_Form: [CHG] No longer need to use getTextRaw() to set label values in form elements; instead, just pass the locale key."



Modified: trunk/Solar/App/Base/Layout/_auth.php
===================================================================
--- trunk/Solar/App/Base/Layout/_auth.php	2008-03-18 04:12:42 UTC (rev 3015)
+++ trunk/Solar/App/Base/Layout/_auth.php	2008-03-18 12:30:42 UTC (rev 3016)
@@ -26,33 +26,23 @@
             </p>
             <?php
                 echo $this->form()
-                          ->submit(array(
-                                'name'    => 'process',
-                                'value'   => $this->getTextRaw('PROCESS_LOGOUT')
-                          ))
+                          ->addProcess('logout', array('id' => 'logout-process'))
                           ->fetch();
             ?>
         <?php else: ?>
             <?php
                 echo $this->form()
-                          ->hidden(array(
-                                'name'    => 'process',
-                                'value'   => $this->getTextRaw('PROCESS_LOGIN')
-                          ))
                           ->text(array(
                                 'name'    => 'handle',
-                                'label'   => $this->getTextRaw('LABEL_HANDLE'),
-                                'attribs' => array('size' => 10),
+                                'label'   => 'LABEL_HANDLE',
+                                'attribs' => array('size' => 10, 'id' => 'login-handle'),
                           ))
                           ->password(array(
                                 'name'    => 'passwd',
-                                'label'   => $this->getTextRaw('LABEL_PASSWD'),
-                                'attribs' => array('size' => 10)
+                                'label'   => 'LABEL_PASSWD',
+                                'attribs' => array('size' => 10, 'id' => 'login-password')
                           ))
-                          ->submit(array(
-                                'name'    => 'process',
-                                'value'   => $this->getTextRaw('PROCESS_LOGIN')
-                          ))
+                          ->addProcess('login', array('id' => 'login-process'))
                           ->fetch();
             ?>
         <?php endif; ?>

Modified: trunk/Solar/View/Helper/Form.php
===================================================================
--- trunk/Solar/View/Helper/Form.php	2008-03-18 04:12:42 UTC (rev 3015)
+++ trunk/Solar/View/Helper/Form.php	2008-03-18 12:30:42 UTC (rev 3016)
@@ -643,7 +643,7 @@
                 }
                 
                 // setup
-                $label    = $this->_view->escape($info['label']);
+                $label    = $this->_view->getText($info['label']);
                 $id       = $this->_view->escape($info['attribs']['id']);
                 $method   = 'form' . ucfirst($info['type']);
                 try {




More information about the Solar-svn mailing list