コード例 #1
0
 function HTML_Quickform_Multichooser($elementName = "name", $elementLabel = "label", $labels = array(), $options = null, $existing = null, $attributes = null)
 {
     //		$commUtil = new Common_Util();
     if ($elementName == '') {
         $elementName = "AUTOGENMULTICHOOSERID" . rand(10000, 99999);
     }
     $this->_pickerOptions = array();
     $this->_usePicker = false;
     require_once PEAR_DIR . 'HTML/QuickForm/select.php';
     require_once PEAR_DIR . 'HTML/QuickForm/button.php';
     HTML_Quickform_element::HTML_Quickform_element($elementName, $elementLabel, $attributes);
     $this->_elementName = $elementName;
     $this->_fromLabel = $labels[0];
     $this->_toLabel = $labels[1];
     $this->_existing = array();
     $this->_allUsers = array();
     $this->_multiname = $elementName;
     $this->_fromBox = new HTML_QuickForm_select($elementName . "From", $elementLabel, array(), $attributes . " id='{$elementName}FROMID'");
     $this->_fromOptions = $options;
     $this->_inBox = new HTML_QuickForm_select($elementName . "To", "", array(), $attributes . " id='{$elementName}TOID' ");
     $this->_toOptions = $existing;
     $this->_hidden = new HTML_QuickForm_hidden($elementName, '', "id='{$elementName}' ", '');
     if (is_array($existing)) {
         foreach ($existing as $key => $value) {
             $this->_hidden->setValue($this->_hidden->getValue() . "{$key};");
         }
     }
     $this->_addButton = new HTML_QuickForm_button("", "Add -->", "onclick=\"javascript:addMultiChooserVal('{$elementName}')\"", "size='10'");
     $this->_remButton = new HTML_QuickForm_button("", "<-- Remove", "onclick=\"javascript:removeMultiChooserVal('{$elementName}')\"", null);
     $this->_addButton->updateAttributes("style='width: 100px'");
     $this->_remButton->updateAttributes("style='width: 100px'");
     $this->_fromBox->setMultiple(true);
     $this->_fromBox->setSize(10);
     $this->_inBox->setMultiple(true);
     $this->_inBox->setSize(10);
     $this->_persistantFreeze = true;
     $this->_type = 'multichooser';
     $this->_oldValue = $_REQUEST[$elementName];
     //$commUtil->request($elementName);
     $this->_refreshOldValue(true);
 }
コード例 #2
0
 /**
  * Class constructor
  * 
  * @param string $sElementName  Name attribute of element
  * @param mixed  $mElementLabel Label attribute of element
  * @param mixed  $mAttributes   Other non-FCK optional attributes
  * 
  * @access public
  * @return void
  */
 function HTML_Quickform_fckeditor($sElementName = NULL, $mElementLabel = NULL, $mAttributes = NULL)
 {
     HTML_Quickform_element::HTML_Quickform_element($sElementName, $mElementLabel, $mAttributes);
     $this->_persistantFreeze = TRUE;
     $this->_type = 'fckeditor';
 }