Beispiel #1
0
 protected function renderLabel(Element $element)
 {
     $label = $element->getLabel();
     if (!empty($label)) {
         echo '<label class="col-sm-2 control-label" for="' . $element->getAttribute("id") . '">';
         echo $label . '</label>';
     }
 }
Beispiel #2
0
 protected function getLabel(Element $element)
 {
     $html = '';
     $label = $element->getLabel();
     if (!empty($label)) {
         $html .= '<label class="col-sm-2 control-label" for="' . $element->getAttribute("id") . '">';
         $html .= $label . '</label>';
     }
     return $html;
 }
Beispiel #3
0
 protected function renderLabel(Element $element)
 {
     $label = $element->getLabel();
     echo '<label for="', $element->getAttribute("id"), '">';
     if (!empty($label)) {
         if ($element->isRequired()) {
             echo '<span class="required">* </span>';
         }
         echo $label;
     }
     echo '</label>';
 }
Beispiel #4
0
 protected function getLabel(Element $element)
 {
     $html = '';
     $label = $element->getLabel();
     if (!empty($label)) {
         $html .= '<label for="' . $element->getAttribute("id") . '">';
         if ($element->isRequired()) {
             $html .= '<span class="required">* </span>';
         }
         $html .= $label;
         $html .= '</label>';
     }
     return $html;
 }
Beispiel #5
0
 public function __construct($name, $value = "", array $properties = null)
 {
     if (!is_array($properties)) {
         $properties = array();
     }
     if (!empty($value)) {
         $properties["value"] = $value;
     }
     parent::__construct("", $name, $properties);
 }
Beispiel #6
0
 public function render()
 {
     $addons = array();
     if (!empty($this->prepend)) {
         $addons[] = "input-prepend";
     }
     if (!empty($this->append)) {
         $addons[] = "input-append";
     }
     if (!empty($addons)) {
         echo '<div class="', implode(" ", $addons), '">';
     }
     $this->renderAddOn("prepend");
     parent::render();
     $this->renderAddOn("append");
     if (!empty($addons)) {
         echo '</div>';
     }
 }
Beispiel #7
0
 public function getInput()
 {
     $html = '';
     $addons = array();
     if (!empty($this->prepend)) {
         $addons[] = "input-prepend";
     }
     if (!empty($this->append)) {
         $addons[] = "input-append";
     }
     if (!empty($addons)) {
         $html .= '<div class="' . implode(" ", $addons) . '">';
     }
     $html .= $this->getAddOn("prepend");
     $html .= parent::getInput();
     $html .= $this->getAddOn("append");
     if (!empty($addons)) {
         $html .= '</div>';
     }
     return $html;
 }
Beispiel #8
0
 public function __construct($label = "Submit", $type = "", array $properties = null)
 {
     if (!is_array($properties)) {
         $properties = array();
     }
     if (!empty($type)) {
         $properties["type"] = $type;
     }
     $class = "btn";
     if (empty($type) || $type == "submit") {
         $class .= " btn-primary";
     }
     if (!empty($properties["class"])) {
         $properties["class"] .= " " . $class;
     } else {
         $properties["class"] = $class;
     }
     if (empty($properties["value"])) {
         $properties["value"] = $label;
     }
     parent::__construct("", "", $properties);
 }
Beispiel #9
0
 public function __construct($label = "", array $properties = null)
 {
     parent::__construct($label, "recaptcha_response_field", $properties);
 }
Beispiel #10
0
 public function __construct($value)
 {
     $properties = array("value" => $value);
     parent::__construct("", "", $properties);
 }