示例#1
0
 public function __construct($id, $storage, $args)
 {
     parent::__construct($id, $storage, $args);
     if ($this->get_arg('type') == 'short') {
         $this->set_renderer(new CUAR_ShortTextFieldRenderer($this->get_arg('label'), $this->get_arg('readonly'), $this->get_arg('inline_help')));
     } else {
         $this->set_renderer(new CUAR_LongTextFieldRenderer($this->get_arg('label'), $this->get_arg('rich_editor'), $this->get_arg('readonly'), $this->get_arg('inline_help')));
     }
     $this->set_validation_rule(new CUAR_StringValidation($this->get_arg('required'), $this->get_arg('min_length'), $this->get_arg('max_length')));
 }
示例#2
0
 public function __construct($id, $storage, $args)
 {
     parent::__construct($id, $storage, $args);
     $this->set_renderer(new CUAR_EmailFieldRenderer($this->get_arg('label'), $this->get_arg('readonly'), $this->get_arg('inline_help')));
     $this->set_validation_rule(new CUAR_EmailValidation($this->get_arg('required')));
 }
示例#3
0
 public function __construct($id, $storage, $args)
 {
     parent::__construct($id, $storage, $args);
     $this->set_renderer(new CUAR_ShortTextFieldRenderer($this->get_arg('readonly'), $this->get_arg('inline_help')));
     $this->set_validation_rule(new CUAR_NumberValidation($this->get_arg('required'), $this->get_arg('force_int'), $this->get_arg('min'), $this->get_arg('max')));
 }