Exemplo n.º 1
0
 /**
  * Class constructor
  *
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field label in form
  * @param     array     $options        (optional)Autocomplete options
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string
  *                                      or an associative array. Date format is passed along the attributes.
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->_type = 'autocomplete';
     if (isset($options)) {
         $this->setOptions($options);
     }
 }
Exemplo n.º 2
0
 /**
  * Constructor
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     if (!isset($attributes['id'])) {
         $attributes['id'] = $elementName;
     }
     $attributes['class'] = 'form-control';
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_appendName = true;
     $this->_type = 'date_range_picker';
 }
Exemplo n.º 3
0
 /**
  * Constructor of Url class
  * @param type $elementName
  * @param type $elementLabel
  * @param type $attributes
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     if (!isset($attributes['id'])) {
         $attributes['id'] = $elementName;
     }
     $attributes['type'] = 'url';
     $attributes['class'] = 'form-control';
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->setType('url');
 }
Exemplo n.º 4
0
 /**
  * Constructor
  *
  * @param string $elementName Element name
  * @param mixed $elementLabel Label(s) for an element
  * @param mixed $attributes Either a typical HTML attribute string or an associative array.
  * @param array $options data which need to be posted.
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null, $options = null)
 {
     global $CFG;
     require_once "{$CFG->dirroot}/repository/lib.php";
     $options = (array) $options;
     foreach ($options as $name => $value) {
         $this->_options[$name] = $value;
     }
     if (!isset($this->_options['usefilepicker'])) {
         $this->_options['usefilepicker'] = true;
     }
     parent::__construct($elementName, $elementLabel, $attributes);
 }
Exemplo n.º 5
0
 /**
  * constructor
  *
  * @param string $elementName (optional) name of the text field
  * @param string $elementLabel (optional) text field label
  * @param string $attributes (optional) Either a typical HTML attribute string or an associative array
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
 }
Exemplo n.º 6
0
 /**
  * Class constructor
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field label
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @throws
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     $attributes['class'] = isset($attributes['class']) ? $attributes['class'] : 'form-control';
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->setType('password');
 }
 public function MoodleQuickForm_tccolourpopup($elementname = null, $elementlabel = null, $attributes = null, $options = null)
 {
     parent::__construct($elementname, $elementlabel, $attributes);
     $this->_type = 'colourtext';
 }