示例#1
0
 /**
  * Returns the checkbox element in HTML
  *
  * @since     1.0
  * @access    public
  * @return    string
  */
 function toHtml()
 {
     if (0 == strlen($this->_text)) {
         $label = '';
     } elseif ($this->_flagFrozen) {
         // チェックの時のみラベルを表示
         $label = $this->getChecked() ? $this->_text : '';
     } else {
         $label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
     }
     return HTML_QuickForm_input::toHtml() . $label;
 }
示例#2
0
 function toHtml()
 {
     if ($this->isFrozen()) {
         return $this->getFrozenHtml();
     } else {
         return parent::toHtml();
     }
 }
示例#3
0
 /**
  * Returns the radio element in HTML
  *
  * @since     1.0
  * @access    public
  * @return string
  */
 public function toHtml()
 {
     if (0 == strlen($this->_text)) {
         $label = '';
     } elseif ($this->_flagFrozen) {
         $label = $this->_text;
     } else {
         $label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
     }
     return HTML_QuickForm_input::toHtml() . $label;
 }
示例#4
0
 /**
  * Returns the checkbox element in HTML
  * 
  * @since     1.0
  * @access    public
  * @return    string
  */
 function toHtml()
 {
     $this->_generateId();
     // Seems to be necessary when this is used in a group.
     if (0 == strlen($this->_text)) {
         $label = '';
     } elseif ($this->_flagFrozen) {
         $label = $this->_text;
     } else {
         $label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
     }
     return HTML_QuickForm_input::toHtml() . $label;
 }
 /**
  * Returns the checkbox element in HTML
  * 
  * @since     1.0
  * @access    public
  * @return    string
  */
 function toHtml()
 {
     $attributes = $this->getAttributes();
     if (0 == strlen($this->_text)) {
         $label = '';
     } elseif ($this->_flagFrozen || isset($attributes['skiplabel'])) {
         $label = $this->_text;
     } else {
         $label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
     }
     unset($attributes['skipLabel']);
     return HTML_QuickForm_input::toHtml() . $label;
 }
示例#6
0
 /**
  * Returns the checkbox element in HTML
  *
  * @since     1.0
  * @access    public
  * @return    string
  */
 public function toHtml()
 {
     if (0 == strlen($this->_text)) {
         $label = '';
     } elseif ($this->_flagFrozen) {
         $label = $this->_text;
     } else {
         $label = '<div class="checkbox">
             <label ' . $this->getAttribute('label-class') . ' ">' . HTML_QuickForm_input::toHtml() . $this->_text . '</label>
             </div>
             ';
         return $label;
     }
     return HTML_QuickForm_input::toHtml() . $label;
 }
示例#7
0
 /**
  * Returns the radio element in HTML
  *
  * @since     1.0
  * @access    public
  * @return    string
  */
 public function toHtml()
 {
     if (0 == strlen($this->_text)) {
         $label = '';
     } elseif ($this->_flagFrozen) {
         $label = $this->_text;
     } else {
         $labelClass = $this->labelClass;
         $radioClass = $this->radioClass;
         $label = '<div class="' . $radioClass . '"><label class="' . $labelClass . '">' . HTML_QuickForm_input::toHtml() . $this->_text . '</label></div>';
         return $label;
     }
     return HTML_QuickForm_input::toHtml() . $label;
 }
示例#8
0
 /**
  * Returns the radio element in HTML
  *
  * @since     1.0
  * @access    public
  * @return    string
  */
 function toHtml()
 {
     if (0 == strlen($this->_text)) {
         $label = '';
     } elseif ($this->_flagFrozen) {
         $label = $this->_text;
     } else {
         ///$label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
         $label = '<label class="radio">' .HTML_QuickForm_input::toHtml().$this->_text . '</label>';
         return  $label;
     }
     return HTML_QuickForm_input::toHtml() . $label;
 } //end func toHtml
示例#9
0
 function toHtml()
 {
     // The captcha must desappear in frozen state
     if ($this->_flagFrozen) {
         return '';
     }
     switch ($this->_method) {
         case 'Numbers_Words':
             require_once 'Numbers/Words.php';
             isset($this->_value) || ($this->_value = rand(1, 1000));
             $html = ucfirst(Numbers_Words::toWords($this->_value, $this->_locale));
             $html .= '&nbsp;' . parent::toHtml();
             break;
         default:
             $html = '';
     }
     HTTP_Session2::set('_HTML_QuickForm_captcha', $this->_value);
     return $html;
 }
示例#10
0
 /**
  * Returns the attachment element in HTML
  *
  * @return string  The html text
  * @access public
  */
 function toHtml()
 {
     if ($this->_flagFrozen) {
         return $this->getFrozenHtml();
     } elseif ($this->_state == QF_ATTACHMENT_UPLOADED) {
         // Return the frozen html ...
         $html = $this->getFrozenHtml();
         // ... and append the html of the unload element (if any)
         if (isset($this->_unload_element)) {
             $html .= '&nbsp;' . $this->_unload_element->toHtml();
         }
         return $html;
     }
     return HTML_QuickForm_input::toHtml();
 }