root/trunk/lib/widget/sfWidgetFormSchemaFormatterDiv.class.php

Revision 53, 0.7 kB (checked in by nperriault, 2 years ago)
  • Ported signin form and action to 1.1 forms framework
  • lib folder layout changed
Line 
1 <?php
2 /**
3  * Symfonians forms global formatter
4  *
5  */
6 class sfWidgetFormSchemaFormatterDiv extends sfWidgetFormSchemaFormatter
7 {
8   protected
9     $rowFormat       = "<div class=\"form-row%is_error%\">\n  %label%\n  %error%\n  %field%\n  %help%\n%hidden_fields%</div>\n",
10     $errorRowFormat  = "%errors%\n",
11     $helpFormat      = '<div class="form-help">%help%</div>',
12     $decoratorFormat = "\n  %content%";
13  
14   public function formatRow($label, $field, $errors = array(), $help = '', $hiddenFields = null)
15   {
16     return strtr(parent::formatRow($label, $field, $errors, $help, $hiddenFields), array(
17       '%is_error%' => (count($errors) > 0) ? ' field_error' : '',
18     ));
19   }
20 }
Note: See TracBrowser for help on using the browser.