Fix: uniformize parameters

This commit is contained in:
Regis Houssin 2017-10-09 15:49:10 +02:00
parent 16b766182c
commit 86c301f197
3 changed files with 10 additions and 10 deletions

View File

@ -1335,8 +1335,8 @@ else
// Create a form array // Create a form array
$formquestion=array( $formquestion=array(
array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'css' => 'minwidth300', 'moreattr' => 'maxlength="128"'), array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"'),
array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'css' => 'minwidth300', 'moreattr' => 'maxlength="128"') array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"')
); );
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);

View File

@ -976,8 +976,8 @@ if ($rowid > 0)
// Create a form array // Create a form array
$formquestion=array( $formquestion=array(
array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'css' => 'minwidth300', 'moreattr' => 'maxlength="128"'), array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"'),
array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'css' => 'minwidth300', 'moreattr' => 'maxlength="128"') array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"')
); );
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);

View File

@ -3573,28 +3573,28 @@ class Form
{ {
$size=(! empty($input['size'])?' size="'.$input['size'].'"':''); $size=(! empty($input['size'])?' size="'.$input['size'].'"':'');
$moreattr=(! empty($input['moreattr'])?' '.$input['moreattr']:''); $moreattr=(! empty($input['moreattr'])?' '.$input['moreattr']:'');
$css=(! empty($input['css'])?' '.$input['css']:''); $morecss=(! empty($input['morecss'])?' '.$input['morecss']:'');
if ($input['type'] == 'text') if ($input['type'] == 'text')
{ {
$more.='<tr><td>'.$input['label'].'</td><td colspan="2" align="left"><input type="text" class="flat'.$css.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></td></tr>'."\n"; $more.='<tr><td>'.$input['label'].'</td><td colspan="2" align="left"><input type="text" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></td></tr>'."\n";
} }
else if ($input['type'] == 'password') else if ($input['type'] == 'password')
{ {
$more.='<tr><td>'.$input['label'].'</td><td colspan="2" align="left"><input type="password" class="flat'.$css.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$m.' /></td></tr>'."\n"; $more.='<tr><td>'.$input['label'].'</td><td colspan="2" align="left"><input type="password" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></td></tr>'."\n";
} }
else if ($input['type'] == 'select') else if ($input['type'] == 'select')
{ {
$more.='<tr><td>'; $more.='<tr><td>';
if (! empty($input['label'])) $more.=$input['label'].'</td><td valign="top" colspan="2" align="left">'; if (! empty($input['label'])) $more.=$input['label'].'</td><td valign="top" colspan="2" align="left">';
$more.=$this->selectarray($input['name'],$input['values'],$input['default'],1); $more.=$this->selectarray($input['name'],$input['values'],$input['default'],1,0,0,$moreattr,0,0,0,'',$morecss);
$more.='</td></tr>'."\n"; $more.='</td></tr>'."\n";
} }
else if ($input['type'] == 'checkbox') else if ($input['type'] == 'checkbox')
{ {
$more.='<tr>'; $more.='<tr>';
$more.='<td>'.$input['label'].' </td><td align="left">'; $more.='<td>'.$input['label'].' </td><td align="left">';
$more.='<input type="checkbox" class="flat" id="'.$input['name'].'" name="'.$input['name'].'"'; $more.='<input type="checkbox" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$moreattr;
if (! is_bool($input['value']) && $input['value'] != 'false') $more.=' checked'; if (! is_bool($input['value']) && $input['value'] != 'false') $more.=' checked';
if (is_bool($input['value']) && $input['value']) $more.=' checked'; if (is_bool($input['value']) && $input['value']) $more.=' checked';
if (isset($input['disabled'])) $more.=' disabled'; if (isset($input['disabled'])) $more.=' disabled';
@ -3610,7 +3610,7 @@ class Form
$more.='<tr>'; $more.='<tr>';
if ($i==0) $more.='<td class="tdtop">'.$input['label'].'</td>'; if ($i==0) $more.='<td class="tdtop">'.$input['label'].'</td>';
else $more.='<td>&nbsp;</td>'; else $more.='<td>&nbsp;</td>';
$more.='<td width="20"><input type="radio" class="flat" id="'.$input['name'].'" name="'.$input['name'].'" value="'.$selkey.'"'; $more.='<td width="20"><input type="radio" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'" value="'.$selkey.'"'.$moreattr;
if ($input['disabled']) $more.=' disabled'; if ($input['disabled']) $more.=' disabled';
$more.=' /></td>'; $more.=' /></td>';
$more.='<td align="left">'; $more.='<td align="left">';