function __construct($type, $value, $name)
 {
     if (is_null($value)) {
         $value = self::generateValue();
     }
     parent::__construct($type, $value, $name);
 }
Esempio n. 2
0
 public function __construct(array $options = array())
 {
     if (!function_exists('recaptcha_get_html')) {
         require Misc::getLibPath() . '/vendors/recaptcha/recaptchalib.php';
     }
     parent::__construct($options);
 }
 function __construct($value = '', $name = null)
 {
     $load = new Loader();
     $this->date_picker = $load->customFormComponent('/widgets/datepicker');
     $this->dropdown = Loader::formComponent('dropdown');
     parent::__construct('hidden', $value, $name);
 }
Esempio n. 4
0
 public function __construct(array $options = array())
 {
     if (!isset($options['bound'])) {
         $options['bound'] = false;
     }
     parent::__construct($options);
 }
Esempio n. 5
0
 /**
  * Create a selection input field.
  *
  * @option 'postback' if true it will submit the form when changed.
  * @option 'selected' forces key to be selected.
  */
 public function __construct($key, $id, $name, $value, $label = null, array $attr = [])
 {
     /* if postback is enabled, add onchange which submits the forrm */
     if ($this->popAttr('postback', $attr, $postback) && $postback) {
         $attr['onchange'] = 'this.form.submit();';
     }
     $this->selected = $value;
     $this->popAttr('selected', $attr, $this->selected);
     $this->popAttr('options', $attr, $this->options);
     /* fill with empty options */
     if ($this->options === null) {
         $this->options = new FormOptions();
     }
     parent::__construct($key, $id, $name, $value, null, $label, $attr);
     /* FormInput sets value which select shouldn't have */
     unset($this->attr['value']);
 }
 function __construct($value = "Submit", $name = null)
 {
     parent::__construct('image', $value, $name);
 }
 function __construct($value = "", $name = null)
 {
     parent::__construct('file', $value, $name);
 }
Esempio n. 8
0
 public function __construct($key, $id, $name, $value, $label, $attr)
 {
     parent::__construct($key, $id, $name, null, null, $label, $attr);
     $this->value = $value;
 }
Esempio n. 9
0
 public function __construct(array $list = array(), array $opt = array(), array $classes = array(), array $optClasses = array())
 {
     $this->valuesList = $list;
     parent::__construct($opt, $classes);
 }
Esempio n. 10
0
 function __construct($value = '', $name = null)
 {
     parent::__construct('hidden', $value, $name);
     $this->setValidator(array(), array('callback' => 'Hello'));
 }
Esempio n. 11
0
 public function __construct($name)
 {
     parent::__construct(FormInputEnumeration::TYPE_TEXT, $name);
     $this->setRenderer(new TextFieldRenderer($this));
 }
Esempio n. 12
0
 function __construct($value = '', $name = null)
 {
     parent::__construct('text', $value, $name);
 }
 function __construct($value, $name = null)
 {
     parent::__construct('hidden', $value, $name);
 }
 function __construct($value = "Reset", $name = null)
 {
     parent::__construct('reset', $value, $name);
 }
 function __construct($value, $name = null)
 {
     parent::__construct('button', $value, $name);
 }
 function __construct($value = '', $name = null)
 {
     parent::__construct('password', $value, $name);
 }
Esempio n. 17
0
 public function __construct($name)
 {
     parent::__construct(FormInputEnumeration::TYPE_CHECKBOX, $name);
     $this->setRenderer(new CheckboxRenderer($this));
 }
 function __construct($name, $options = null, $optionsId = null)
 {
     $this->options = $options;
     $this->optionsId = $optionsId;
     return parent::__construct($name);
 }
Esempio n. 19
0
 public function __construct($name, $label = '', &$oForm = Null)
 {
     parent::__construct($name, $label);
     $this->attrs['type'] = 'file';
     $this->autoBound(False);
     if (substr($this->getName(), -2) == '[]') {
         $this->expect_array = True;
     }
     if (is_null($oForm) or !$oForm instanceof Form) {
         trigger_error('Une instance du formulaire doit être passée comme troisième paramètre au champ « ' . $name . ' ».', E_USER_ERROR);
     }
     //on adapte le form
     $this->form = $oForm;
     $this->form->setEnctype('multipart/form-data');
     //définition des erreurs
     $this->setErrorText('invalid_ext', 'L\'extension du fichier n\'est pas valide. Extensions autorisées : %s');
     $this->setErrorText('too_big', 'Le fichier est trop volumineux (%d octets max)');
     $this->setErrorText('too_many_files', 'Trop de fichiers ont été soumis. Nombre maximal : %d');
     $this->setErrorText('not_enough_files', 'Pas assez de fichiers ont été soumis. Nombre minimal : %d');
 }
Esempio n. 20
0
 public function __construct($text, $label, $attr)
 {
     parent::__construct(false, false, false, null, null, $label, $attr);
     $this->text = $text;
 }