Ejemplo n.º 1
0
 /**
  * Constructor ColorPicker
  * @param Page|Form $page_or_form_object 
  * @param string $name 
  * @param string $id 
  * @param string $value 
  * @param string $width 
  * @param double $length [default value: 0]
  */
 function __construct($page_or_form_object, $name = '', $id = '', $value = '', $width = '', $length = 0)
 {
     parent::__construct($page_or_form_object, $name, $id, $value, $width, $length);
     $this->isButton(false);
     $this->setClass("color {}");
     $this->addJavaScript(BASE_URL . "wsp/js/jscolor.js", "", true);
 }
Ejemplo n.º 2
0
 public function __construct($name, $value = '', array $attributes = array())
 {
     parent::__construct($name, $value);
     if (is_object($value)) {
         $value = \System\Std\Object::getPropertyValue($value, $name);
     }
     $attributes['value'] = $value;
     $attributes['name'] = !array_key_exists('name', $attributes) ? $name : $attributes['name'];
     $attributes['id'] = !array_key_exists('id', $attributes) ? $name : $attributes['id'];
     $this->attributes = array_merge($this->attributes, $attributes);
 }
Ejemplo n.º 3
0
 /**
  * Constructor Calendar
  * @param mixed $page_or_form_object 
  * @param string $name 
  * @param string $id 
  * @param string $value 
  * @param string $width 
  */
 function __construct($page_or_form_object, $name = '', $id = '', $value = '', $width = '')
 {
     parent::__construct($page_or_form_object, $name, $id, $value, $width);
     $this->type = "calendar";
     if ($this->getPage()->getLanguage() == "fr") {
         $this->setDateFormat(Calendar::DATE_FORMAT_FRENCH);
     } else {
         if ($this->getPage()->getLanguage() == "de") {
             $this->setDateFormat(Calendar::DATE_FORMAT_GERMAN);
         }
     }
 }
Ejemplo n.º 4
0
 /**
  * Constructor Password
  * @param mixed $page_or_form_object 
  * @param string $name 
  * @param string $id 
  * @param string $value 
  * @param string $width 
  * @param double $length [default value: 0]
  */
 function __construct($page_or_form_object, $name = '', $id = '', $value = '', $width = '', $length = 0)
 {
     parent::__construct($page_or_form_object, $name, $id, $value, $width, $length);
     $this->type = "password";
 }
Ejemplo n.º 5
0
 public function __construct($name, array $attributes = array())
 {
     parent::__construct($name, $attributes);
     $this->setName($name);
     $this->setAttribute('type', 'password');
 }