/** * Arguments: * - cmd * - label * - ++ (optional) * * @param array $args The tokenized definition, only split at spaces */ public function __construct($args) { $pp = array_search('++', $args, true); if ($pp !== false) { unset($args[$pp]); $this->autoinc = true; } parent::__construct($args); if ($this->autoinc) { global $ID; $key = $this->get_key(); $c_val = p_get_metadata($ID, 'bureaucracy ' . $key); if (is_null($c_val)) { if (!isset($this->opt['value'])) { $this->opt['value'] = 0; } p_set_metadata($ID, array('bureaucracy' => array($key => $this->opt['value']))); } else { $this->opt['value'] = $c_val; } } }
function __construct($args) { parent::__construct($args); $this->tpl['class'] .= ' userspicker'; }
function __construct($args) { parent::__construct($args); $this->tpl = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@LABEL@@', '', '@@CLASS@@', array('class' => 'datepicker edit', 'maxlength' => '10')); }