Example #1
0
 /**
  * Class constuctor.
  *
  * @access   public
  * @param    string $name
  * @param    Form   $form
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct($name, Form $form)
 {
     parent::__construct($name, $form);
     $this->getAttributes()->setAttribute('type', 'file');
     $this->getFormObject()->addEnctype();
 }
Example #2
0
 /**
  * Constructor.
  *
  * @access   public
  * @param    string $name
  * @param    Form   $form
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct($name, Form &$form)
 {
     parent::__construct($name, $form);
     $this->getAttributes()->setAttribute('type', 'checkbox');
 }
Example #3
0
 /**
  * Constructor.
  *
  * @access   public
  * @param    string $name
  * @param    Form   $form
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct($name, Form &$form)
 {
     parent::__construct($name, $form);
     $this->getAttributes()->addToAttribute('class', 'form-control');
 }
Example #4
0
 /**
  * @access   public
  * @param    string $name
  * @param    Form   $form
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct($name, Form &$form)
 {
     parent::__construct($name, $form);
     $this->getAttributes()->setAttribute('type', 'text');
     $this->getAttributes()->addToAttribute('class', 'form-control input-sm');
 }
Example #5
0
 /**
  * Constructor
  *
  * @access   public
  * @param    string $name
  * @param    Form   $form
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct($name, Form &$form)
 {
     parent::__construct($name, $form);
     $mValue = $this->getValue();
     if (empty($mValue)) {
         $this->setValue(['day' => '', 'month' => '', 'year' => '']);
     }
 }
Example #6
0
 /**
  * Constructor.
  *
  * @access   public
  * @param    string $name
  * @param    Form   $form
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function __construct($name, Form &$form)
 {
     // add reCaptcha JavaScript API
     Router::getInstance()->getController()->addJs('https://www.google.com/recaptcha/api.js?hl=pl');
     // get private and public keys
     $this->sPublickey = Config::get('recaptcha.publickey');
     $this->sPrivatekey = Config::get('recaptcha.privatekey');
     // parent construct
     parent::__construct($name, $form);
 }