mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge remote-tracking branch 'upstream/develop' into camelCaps
This commit is contained in:
@@ -1357,7 +1357,7 @@ class Form
|
||||
* @param string $moreclass Add more class to class style
|
||||
* @param bool $options_only Return options only (for ajax treatment)
|
||||
* @param integer $showsoc Add company into label
|
||||
* @param int $forcecombo Force to use combo box
|
||||
* @param int $forcecombo Force to use combo box (so no ajax beautify effect)
|
||||
* @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
|
||||
* @param string $htmlid Html id to use instead of htmlname
|
||||
@@ -1566,7 +1566,7 @@ class Form
|
||||
else $sql.= " WHERE u.entity IS NOT NULL";
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
|
||||
{
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||
@@ -3716,7 +3716,7 @@ class Form
|
||||
|
||||
// Now add questions
|
||||
$more.='<table class="paddingtopbottomonly" width="100%">'."\n";
|
||||
$more.='<tr><td colspan="3">'.(! empty($formquestion['text'])?$formquestion['text']:'').'</td></tr>'."\n";
|
||||
if (! empty($formquestion['text'])) $more.='<tr><td colspan="2">'.$formquestion['text'].'</td></tr>'."\n";
|
||||
foreach ($formquestion as $key => $input)
|
||||
{
|
||||
if (is_array($input) && ! empty($input))
|
||||
@@ -3727,29 +3727,28 @@ class Form
|
||||
|
||||
if ($input['type'] == 'text')
|
||||
{
|
||||
$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";
|
||||
$more.='<tr><td'.(empty($input['tdclass'])?'':(' class="'.$input['tdclass'].'"')).'>'.$input['label'].'</td><td 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')
|
||||
{
|
||||
$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";
|
||||
$more.='<tr><td'.(empty($input['tdclass'])?'':(' class="'.$input['tdclass'].'"')).'>'.$input['label'].'</td><td 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')
|
||||
{
|
||||
$more.='<tr><td>';
|
||||
if (! empty($input['label'])) $more.=$input['label'].'</td><td valign="top" colspan="2" align="left">';
|
||||
$more.='<tr><td'.(empty($input['tdclass'])?'':(' class="'.$input['tdclass'].'"')).'>';
|
||||
if (! empty($input['label'])) $more.=$input['label'].'</td><td class="tdtop" align="left">';
|
||||
$more.=$this->selectarray($input['name'],$input['values'],$input['default'],1,0,0,$moreattr,0,0,0,'',$morecss);
|
||||
$more.='</td></tr>'."\n";
|
||||
}
|
||||
else if ($input['type'] == 'checkbox')
|
||||
{
|
||||
$more.='<tr>';
|
||||
$more.='<td>'.$input['label'].' </td><td align="left">';
|
||||
$more.='<td'.(empty($input['tdclass'])?'':(' class="'.$input['tdclass'].'"')).'>'.$input['label'].' </td><td align="left">';
|
||||
$more.='<input type="checkbox" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$moreattr;
|
||||
if (! is_bool($input['value']) && $input['value'] != 'false' && $input['value'] != '0') $more.=' checked';
|
||||
if (is_bool($input['value']) && $input['value']) $more.=' checked';
|
||||
if (isset($input['disabled'])) $more.=' disabled';
|
||||
$more.=' /></td>';
|
||||
$more.='<td align="left"> </td>';
|
||||
$more.='</tr>'."\n";
|
||||
}
|
||||
else if ($input['type'] == 'radio')
|
||||
@@ -3758,12 +3757,11 @@ class Form
|
||||
foreach($input['values'] as $selkey => $selval)
|
||||
{
|
||||
$more.='<tr>';
|
||||
if ($i==0) $more.='<td class="tdtop">'.$input['label'].'</td>';
|
||||
else $more.='<td> </td>';
|
||||
$more.='<td width="20"><input type="radio" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'" value="'.$selkey.'"'.$moreattr;
|
||||
if ($i==0) $more.='<td'.(empty($input['tdclass'])?' class="tdtop"':(' class="tdtop '.$input['tdclass'].'"')).'>'.$input['label'].'</td>';
|
||||
else $more.='<td'.(empty($input['tdclass'])?'':(' class="'.$input['tdclass'].'"')).'> </td>';
|
||||
$more.='<td><input type="radio" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'" value="'.$selkey.'"'.$moreattr;
|
||||
if ($input['disabled']) $more.=' disabled';
|
||||
$more.=' /></td>';
|
||||
$more.='<td align="left">';
|
||||
$more.=' /> ';
|
||||
$more.=$selval;
|
||||
$more.='</td></tr>'."\n";
|
||||
$i++;
|
||||
@@ -3771,8 +3769,8 @@ class Form
|
||||
}
|
||||
else if ($input['type'] == 'date')
|
||||
{
|
||||
$more.='<tr><td>'.$input['label'].'</td>';
|
||||
$more.='<td colspan="2" align="left">';
|
||||
$more.='<tr><td'.(empty($input['tdclass'])?'':(' class="'.$input['tdclass'].'"')).'>'.$input['label'].'</td>';
|
||||
$more.='<td align="left">';
|
||||
$more.=$this->select_date($input['value'],$input['name'],0,0,0,'',1,0,1);
|
||||
$more.='</td></tr>'."\n";
|
||||
$formquestion[] = array('name'=>$input['name'].'day');
|
||||
@@ -3783,15 +3781,15 @@ class Form
|
||||
}
|
||||
else if ($input['type'] == 'other')
|
||||
{
|
||||
$more.='<tr><td>';
|
||||
if (! empty($input['label'])) $more.=$input['label'].'</td><td colspan="2" align="left">';
|
||||
$more.='<tr><td'.(empty($input['tdclass'])?'':(' class="'.$input['tdclass'].'"')).'>';
|
||||
if (! empty($input['label'])) $more.=$input['label'].'</td><td align="left">';
|
||||
$more.=$input['value'];
|
||||
$more.='</td></tr>'."\n";
|
||||
}
|
||||
|
||||
else if ($input['type'] == 'onecolumn')
|
||||
{
|
||||
$more.='<tr><td colspan="3" align="left">';
|
||||
$more.='<tr><td colspan="2" align="left">';
|
||||
$more.=$input['value'];
|
||||
$more.='</td></tr>'."\n";
|
||||
}
|
||||
@@ -3845,14 +3843,14 @@ class Form
|
||||
$( "#'.$dialogconfirm.'" ).dialog(
|
||||
{
|
||||
autoOpen: '.($autoOpen ? "true" : "false").',';
|
||||
if ($newselectedchoice == 'no')
|
||||
{
|
||||
$formconfirm.='
|
||||
if ($newselectedchoice == 'no')
|
||||
{
|
||||
$formconfirm.='
|
||||
open: function() {
|
||||
$(this).parent().find("button.ui-button:eq(2)").focus();
|
||||
},';
|
||||
}
|
||||
$formconfirm.='
|
||||
}
|
||||
$formconfirm.='
|
||||
resizable: false,
|
||||
height: "'.$height.'",
|
||||
width: "'.$width.'",
|
||||
|
||||
Reference in New Issue
Block a user