Beispiel #1
0
	public function __construct($forcedValue = NULL)
	{
		parent::__construct();
		$this->control->type = 'hidden';
		$this->value = (string) $forcedValue;
		$this->forcedValue = $forcedValue;
	}
Beispiel #2
0
	/**
	 * @param  string  label
	 * @param  array   options from which to choose
	 */
	public function __construct($label = NULL, array $items = NULL)
	{
		parent::__construct($label);
		$this->control->type = 'radio';
		$this->container = Html::el();
		$this->separator = Html::el('br');
		if ($items !== NULL) $this->setItems($items);
	}
Beispiel #3
0
 public function __construct($forcedValue = NULL)
 {
     parent::__construct();
     $this->control->type = 'hidden';
     $this->control->data['nette-rules'] = FALSE;
     $this->value = (string) $forcedValue;
     $this->forcedValue = $forcedValue;
 }
Beispiel #4
0
	/**
	 * @param  string  label
	 * @param  array   items from which to choose
	 * @param  int     number of rows that should be visible
	 */
	public function __construct($label = NULL, array $items = NULL, $size = NULL)
	{
		parent::__construct($label);
		$this->control->setName('select');
		$this->control->size = $size > 1 ? (int) $size : NULL;
		if ($items !== NULL) {
			$this->setItems($items);
		}
	}
Beispiel #5
0
 /**
  * @param  string  label
  * @param  array   items from which to choose
  * @param  int     number of rows that should be visible
  */
 public function __construct($label = NULL, array $items = NULL, $size = NULL)
 {
     parent::__construct($label);
     $this->control->setName('select');
     $this->control->size = $size > 1 ? (int) $size : NULL;
     $this->control->onfocus = 'this.onmousewheel=function(){return false}';
     // prevents accidental change in IE
     $this->label->onclick = 'document.getElementById(this.htmlFor).focus();return false';
     // prevents deselect in IE 5 - 6
     if ($items !== NULL) {
         $this->setItems($items);
     }
 }
Beispiel #6
0
 /**
  * @param  string  caption
  */
 public function __construct($caption = NULL)
 {
     parent::__construct($caption);
     $this->control->type = 'button';
 }
Beispiel #7
0
 /**
  * @param  string  label
  */
 public function __construct($label = NULL)
 {
     parent::__construct($label);
     $this->control->type = 'file';
 }
Beispiel #8
0
	/**
	 * @param  string  label
	 */
	public function __construct($label = NULL)
	{
		parent::__construct($label);
		$this->control->type = 'checkbox';
		$this->value = FALSE;
	}
Beispiel #9
0
 /**
  * @param  string  label
  */
 public function __construct($label = NULL)
 {
     parent::__construct($label);
     $this->control->type = 'file';
     $this->control->data['nette-rules'] = FALSE;
 }