Esempio n. 1
0
 protected function renderLabel(\PFBC\Element $element)
 {
     $label = $element->getLabel();
     if (!empty($label)) {
         echo '<label class="control-label" for="', $element->getAttribute("id"), '">';
         if ($element->isRequired()) {
             echo '<span class="required">* </span>';
         }
         echo $label, '</label>';
     }
 }
 public function __construct($sLabel, array $aProperties = null)
 {
     $this->attributes = array('type' => 'submit', 'value' => $sLabel);
     if (!is_array($aProperties)) {
         $aProperties = array();
     }
     parent::__construct('', '', $aProperties);
 }
Esempio n. 3
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);
 }
 public function __construct($sName, $sValue = '', array $aProperties = null)
 {
     if (!is_array($aProperties)) {
         $aProperties = array();
     }
     if (!empty($sValue)) {
         $aProperties['value'] = $sValue;
     }
     // We remove the session of the hidden fields
     unset($_SESSION['pfbc'][\PFBC\Form::getFormId()]['values'][$sName]);
     parent::__construct('', $sName, $aProperties);
 }
 public function __construct($sLabel = '', $sType = '', array $aProperties = null)
 {
     if (empty($sLabel)) {
         $sLabel = t('Submit');
     }
     // Default translation value
     $this->attributes = array('type' => 'submit', 'value' => t('Submit'));
     if (!is_array($aProperties)) {
         $aProperties = array();
     }
     if (!empty($sType)) {
         $aProperties['type'] = $sType;
     }
     if (empty($aProperties['value'])) {
         $aProperties['value'] = $sLabel;
     }
     parent::__construct($sLabel, '', $aProperties);
 }
Esempio n. 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>';
     }
 }
Esempio n. 7
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);
 }
 public function __construct($label = '', array $properties = null)
 {
     parent::__construct($label, 'recaptcha_response_field', $properties);
 }
Esempio n. 9
0
 /**
  * 
  * @param type $label
  * @param type $name
  * @param array $options - json array, compatible with easy ui treegrid element
  * @param array $properties
  */
 public function __construct($label, $name, $options, array $properties = null)
 {
     $this->options = $options;
     $this->name = $name;
     parent::__construct($label, $name, $properties);
 }
Esempio n. 10
0
 public function __construct($value)
 {
     $properties = array("value" => $value);
     parent::__construct("", "", $properties);
 }