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 15... Line 15...
15
// +----------------------------------------------------------------------+
15
// +----------------------------------------------------------------------+
16
// | Authors: Adam Daniel <adaniel1@eesus.jnj.com>                        |
16
// | Authors: Adam Daniel <adaniel1@eesus.jnj.com>                        |
17
// |          Bertrand Mansion <bmansion@mamasam.com>                     |
17
// |          Bertrand Mansion <bmansion@mamasam.com>                     |
18
// +----------------------------------------------------------------------+
18
// +----------------------------------------------------------------------+
19
//
19
//
20
// $Id: advcheckbox.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
20
// $Id: advcheckbox.php,v 1.2 2005-09-20 17:01:22 ddelon Exp $
Line 21... Line 21...
21
 
21
 
Line 22... Line 22...
22
require_once('HTML/QuickForm/checkbox.php');
22
require_once('HTML/QuickForm/checkbox.php');
23
 
23
 
Line 195... Line 195...
195
            $oldJs   = $this->getAttribute('onclick');
195
            $oldJs   = $this->getAttribute('onclick');
196
            $this->updateAttributes(array(
196
            $this->updateAttributes(array(
197
                'name'    => $this->getPrivateName($oldName),
197
                'name'    => $this->getPrivateName($oldName),
198
                'onclick' => $this->getOnclickJs($oldName) . ' ' . $oldJs
198
                'onclick' => $this->getOnclickJs($oldName) . ' ' . $oldJs
199
            ));
199
            ));
200
            $html = parent::toHtml() . '<input type="hidden" name="' . $oldName . 
200
            $html = parent::toHtml() . '<input' .
-
 
201
                    $this->_getAttrString(array(
-
 
202
                        'type'  => 'hidden', 
-
 
203
                        'name'  => $oldName, 
201
                    '" value="' . $this->getValue() . '" />';
204
                        'value' => $this->getValue()
-
 
205
                    )) . ' />';
202
            // revert the name and JS, in case this method will be called once more
206
            // revert the name and JS, in case this method will be called once more
203
            $this->updateAttributes(array(
207
            $this->updateAttributes(array(
204
                'name'    => $oldName, 
208
                'name'    => $oldName, 
205
                'onclick' => $oldJs
209
                'onclick' => $oldJs
206
            ));
210
            ));