Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 17, 2018
1 parent 651ba74 commit 508133b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -5122,7 +5122,7 @@ function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keypr
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
$form=new Form($this->db);
}

$val=$this->fields[$key];

$out='';
Expand All @@ -5137,20 +5137,20 @@ function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keypr
$param['options']=array($reg[1].':'.$reg[2]=>'N');
$type ='link';
}else if(preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)){

$param['options']=array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4]=>'N');
$type ='sellist';
}else if(preg_match('/varchar\((\d+)\)/', $val['type'],$reg)){

$param['options']=array();
$type ='varchar';
$size=$reg[1];
}else if(preg_match('/varchar/', $val['type'])){

$param['options']=array();
$type ='varchar';
}else if(is_array($this->fields[$key]['arrayofkeyval'])){

$param['options']=$this->fields[$key]['arrayofkeyval'];
$type ='select';
}else {
Expand All @@ -5164,7 +5164,7 @@ function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keypr
$computed=$this->fields[$key]['computed'];
$unique=$this->fields[$key]['unique'];
$required=$this->fields[$key]['required'];

$langfile=$this->fields[$key]['langfile'];
$list=$this->fields[$key]['list'];
$hidden=abs($this->fields[$key]['visible'])!=1?1:0;
Expand Down Expand Up @@ -5707,7 +5707,7 @@ function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keypr
*/
return $out;
}

/**
* Return HTML string to show a field into a page
* Code very similar with showOutputField of extra fields
Expand Down

0 comments on commit 508133b

Please sign in to comment.