Add type ip
This commit is contained in:
parent
ab81492fa4
commit
6d3059d2a8
@ -6868,7 +6868,7 @@ abstract class CommonObject
|
||||
$out = '<input type="text" class="flat '.$morecss.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'"'.($moreparam ? $moreparam : '').($autofocusoncreate ? ' autofocus' : '').'>';
|
||||
} elseif (preg_match('/varchar/', $type)) {
|
||||
$out = '<input type="text" class="flat '.$morecss.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'"'.($size > 0 ? ' maxlength="'.$size.'"' : '').' value="'.dol_escape_htmltag($value).'"'.($moreparam ? $moreparam : '').($autofocusoncreate ? ' autofocus' : '').'>';
|
||||
} elseif (in_array($type, array('mail', 'phone', 'url'))) {
|
||||
} elseif (in_array($type, array('mail', 'phone', 'url', 'ip'))) {
|
||||
$out = '<input type="text" class="flat '.$morecss.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').($autofocusoncreate ? ' autofocus' : '').'>';
|
||||
} elseif (preg_match('/^text/', $type)) {
|
||||
if (!preg_match('/search_/', $keyprefix)) { // If keyprefix is search_ or search_options_, we must just use a simple text field
|
||||
@ -7498,6 +7498,8 @@ abstract class CommonObject
|
||||
$value = dol_print_url($value, '_blank', 32, 1);
|
||||
} elseif ($type == 'phone') {
|
||||
$value = dol_print_phone($value, '', 0, 0, '', ' ', 'phone');
|
||||
} elseif ($type == 'ip') {
|
||||
$value = dol_print_ip($value, 0);
|
||||
} elseif ($type == 'price') {
|
||||
if (!is_null($value) && $value !== '') {
|
||||
$value = price($value, 0, $langs, 0, 0, -1, $conf->currency);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user