예제 #1
0
 function form_element(&$form, $value, $opt = array())
 {
     parent::form_element($form, $value, $opt);
     global $lang_str;
     /* set default values for options */
     $opt_err_msg = isset($opt["err_msg"]) ? $opt["err_msg"] : null;
     $reg =& CReg::Singleton();
     $form->add_element(array("type" => "text", "name" => $this->name, "size" => 16, "maxlength" => 255, "value" => $value, "valid_regex" => $this->is_required() ? "^" . $reg->sip_address . "\$" : "^(" . $reg->sip_address . ")?\$", "valid_e" => $opt_err_msg ? $opt_err_msg : "'" . $this->get_description() . "' " . $lang_str['fe_is_not_sip_adr'], "extrahtml" => "onBlur='sip_address_completion(this)'"));
 }