Subversion Repositories Applications.papyrus

Rev

Rev 320 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 320 Rev 443
Line 16... Line 16...
16
// | Authors: Alexey Borzov <borz_off@cs.msu.su>                          |
16
// | Authors: Alexey Borzov <borz_off@cs.msu.su>                          |
17
// |          Adam Daniel <adaniel1@eesus.jnj.com>                        |
17
// |          Adam Daniel <adaniel1@eesus.jnj.com>                        |
18
// |          Bertrand Mansion <bmansion@mamasam.com>                     |
18
// |          Bertrand Mansion <bmansion@mamasam.com>                     |
19
// +----------------------------------------------------------------------+
19
// +----------------------------------------------------------------------+
20
//
20
//
21
// $Id: Default.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
21
// $Id: Default.php,v 1.2 2005-09-20 17:01:22 ddelon Exp $
Line 22... Line 22...
22
 
22
 
Line 23... Line 23...
23
require_once('HTML/QuickForm/Renderer.php');
23
require_once('HTML/QuickForm/Renderer.php');
24
 
24
 
Line 152... Line 152...
152
    * @access public
152
    * @access public
153
    * @return string
153
    * @return string
154
    */
154
    */
155
    function toHtml()
155
    function toHtml()
156
    {
156
    {
-
 
157
        // _hiddenHtml is cleared in finishForm(), so this only matters when
-
 
158
        // finishForm() was not called (e.g. group::toHtml(), bug #3511)
157
        return $this->_html;
159
        return $this->_hiddenHtml . $this->_html;
158
    } // end func toHtml
160
    } // end func toHtml
Line 159... Line 161...
159
    
161
    
160
   /**
162
   /**
161
    * Called when visiting a form, before processing any form elements
163
    * Called when visiting a form, before processing any form elements
Line 189... Line 191...
189
        if (strpos($this->_formTemplate, '{hidden}')) {
191
        if (strpos($this->_formTemplate, '{hidden}')) {
190
            $html = str_replace('{hidden}', $this->_hiddenHtml, $html);
192
            $html = str_replace('{hidden}', $this->_hiddenHtml, $html);
191
        } else {
193
        } else {
192
            $this->_html .= $this->_hiddenHtml;
194
            $this->_html .= $this->_hiddenHtml;
193
        }
195
        }
-
 
196
        $this->_hiddenHtml = '';
194
        $this->_html = str_replace('{content}', $this->_html, $html);
197
        $this->_html = str_replace('{content}', $this->_html, $html);
195
        // add a validation script
198
        // add a validation script
196
        if ('' != ($script = $form->getValidationScript())) {
199
        if ('' != ($script = $form->getValidationScript())) {
197
            $this->_html = $script . "\n" . $this->_html;
200
            $this->_html = $script . "\n" . $this->_html;
198
        }
201
        }