/**
  * @param string $value A value
  * @param string $name An optional name
  * @param string $class An optional CSS class
  */
 function __initialize($value = false, $name = false, $class = false)
 {
     parent::__initialize();
     $this->setType("text")->setValue($value)->setName($name);
     if ($class) {
         $this->class = $class;
     }
 }
Example #2
0
 /**
  * Creates a Button.
  * 
  * Note that you can safely ignore all but the $label argument if your new button
  * shall not redirect elsewhere on click.
  * @param string $label Label text
  * @param string $controller Controller for click redirect
  * @param string $event Event for click redirect
  * @param mixed $data Data for click redirect
  */
 function __initialize($label, $controller = "", $event = "", $data = "")
 {
     parent::__initialize();
     $this->setType("button")->setValue($label);
     if ($controller != "" && strpos($controller, "\$") === false && strpos($controller, "?") === false) {
         $query = "wdf.redirect('" . buildQuery($controller, $event, $data) . "')";
     } else {
         $query = $controller;
     }
     if ($query != "") {
         $this->onclick = $query;
     }
 }
 /**
  * @param string $name a name for it
  */
 function __initialize($name = false)
 {
     parent::__initialize();
     $this->setType("password")->attr('autocomplete', 'off')->setName($name);
 }
 /**
  * @param string $label A text as label
  */
 function __initialize($label = false)
 {
     parent::__initialize("input");
     $this->setType("submit")->setValue($label);
 }
Example #5
0
 /**
  * @param string $name The name
  */
 function __initialize($name = false)
 {
     parent::__initialize();
     $this->setType("checkbox")->setName($name)->setValue(1);
 }
 /**
  * @param string $value A value
  * @param string $name The name
  */
 function __initialize($value = false, $name = false)
 {
     parent::__initialize();
     $this->setType('radio')->setName($name)->setValue($value);
 }
 /**
  * @param string $name a name for it
  */
 function __initialize($name = false)
 {
     parent::__initialize();
     $this->setType("password")->setName($name);
 }