forked from Wavyzz/dolibarr
Fix: wrong EOL
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ function commissions_admin_prepare_head()
|
|||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf,$langs,'',$head,$h,'commissionsadmin');
|
complete_head_from_modules($conf,$langs,'',$head,$h,'commissionsadmin');
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,'',$head,$h,'commissionsadmin','remove');
|
complete_head_from_modules($conf,$langs,'',$head,$h,'commissionsadmin','remove');
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ function categories_prepare_head($object,$type)
|
|||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type);
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type);
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type,'remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type,'remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ function contact_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'contact','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'contact','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ function facture_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ function propal_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'propal','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'propal','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ function user_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'user','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'user','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
@@ -152,37 +152,37 @@ function group_prepare_head($object)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @return array Array of tabs to shoc
|
* @return array Array of tabs to shoc
|
||||||
*/
|
*/
|
||||||
function user_admin_prepare_head()
|
function user_admin_prepare_head()
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/user.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/user.php';
|
||||||
$head[$h][1] = $langs->trans("Parameters");
|
$head[$h][1] = $langs->trans("Parameters");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields");
|
$head[$h][1] = $langs->trans("ExtraFields");
|
||||||
$head[$h][2] = 'attributes';
|
$head[$h][2] = 'attributes';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'useradmin');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'useradmin');
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'useradmin','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'useradmin','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -830,7 +830,7 @@ else
|
|||||||
if ($ret == 'html') print '<br />';
|
if ($ret == 'html') print '<br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
$head=holiday_prepare_head($cp);
|
$head=holiday_prepare_head($cp);
|
||||||
|
|
||||||
dol_fiche_head($head,'card',$langs->trans("CPTitreMenu"),0,'holiday');
|
dol_fiche_head($head,'card',$langs->trans("CPTitreMenu"),0,'holiday');
|
||||||
|
|
||||||
|
|||||||
@@ -183,9 +183,9 @@ function paypaladmin_prepare_head()
|
|||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'paypaladmin');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'paypaladmin');
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'paypaladmin','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'paypaladmin','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,21 +195,21 @@ if ($action == 'setprofid')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Activate ProfId
|
//Activate ProfId
|
||||||
if ($action == 'setprofidmandatory')
|
if ($action == 'setprofidmandatory')
|
||||||
{
|
{
|
||||||
$status = GETPOST('status','alpha');
|
$status = GETPOST('status','alpha');
|
||||||
|
|
||||||
$idprof="SOCIETE_IDPROF".$value."_MANDATORY";
|
$idprof="SOCIETE_IDPROF".$value."_MANDATORY";
|
||||||
if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0)
|
if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -550,9 +550,9 @@ $profid[2][0]=$langs->trans("ProfId3");
|
|||||||
$profid[2][1]=$langs->transcountry('ProfId3', $mysoc->country_code);
|
$profid[2][1]=$langs->transcountry('ProfId3', $mysoc->country_code);
|
||||||
$profid[3][0]=$langs->trans("ProfId4");
|
$profid[3][0]=$langs->trans("ProfId4");
|
||||||
$profid[3][1]=$langs->transcountry('ProfId4', $mysoc->country_code);
|
$profid[3][1]=$langs->transcountry('ProfId4', $mysoc->country_code);
|
||||||
$profid[4][0]=$langs->trans("ProfId5");
|
$profid[4][0]=$langs->trans("ProfId5");
|
||||||
$profid[4][1]=$langs->transcountry('ProfId5', $mysoc->country_code);
|
$profid[4][1]=$langs->transcountry('ProfId5', $mysoc->country_code);
|
||||||
$profid[5][0]=$langs->trans("ProfId6");
|
$profid[5][0]=$langs->trans("ProfId6");
|
||||||
$profid[5][1]=$langs->transcountry('ProfId6', $mysoc->country_code);
|
$profid[5][1]=$langs->transcountry('ProfId6', $mysoc->country_code);
|
||||||
|
|
||||||
$var = true;
|
$var = true;
|
||||||
@@ -588,17 +588,17 @@ while ($i < $nbofloop)
|
|||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mandatory)
|
if ($mandatory)
|
||||||
{
|
{
|
||||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofidmandatory&value='.($i+1).'&status=0">';
|
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofidmandatory&value='.($i+1).'&status=0">';
|
||||||
print img_picto($langs->trans("Activated"),'switch_on');
|
print img_picto($langs->trans("Activated"),'switch_on');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofidmandatory&value='.($i+1).'&status=1">';
|
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofidmandatory&value='.($i+1).'&status=1">';
|
||||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,13 +203,13 @@ if (empty($reshook))
|
|||||||
$action = ($action=='add'?'create':'edit');
|
$action = ($action=='add'?'create':'edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
// We set country_id, country_code and country for the selected country
|
// We set country_id, country_code and country for the selected country
|
||||||
$object->country_id=GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id;
|
$object->country_id=GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id;
|
||||||
if ($object->country_id)
|
if ($object->country_id)
|
||||||
{
|
{
|
||||||
$tmparray=getCountry($object->country_id,'all');
|
$tmparray=getCountry($object->country_id,'all');
|
||||||
$object->country_code=$tmparray['code'];
|
$object->country_code=$tmparray['code'];
|
||||||
$object->country=$tmparray['label'];
|
$object->country=$tmparray['label'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for duplicate or mandatory prof id
|
// Check for duplicate or mandatory prof id
|
||||||
@@ -229,12 +229,12 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY';
|
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY';
|
||||||
if (! $vallabel && ! empty($conf->global->$idprof_mandatory))
|
if (! $vallabel && ! empty($conf->global->$idprof_mandatory))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error++;
|
$error++;
|
||||||
$errors[] = $langs->trans("ErrorProdIdIsMandatory", $langs->transcountry('ProfId'.$i, $object->country_code));
|
$errors[] = $langs->trans("ErrorProdIdIsMandatory", $langs->transcountry('ProfId'.$i, $object->country_code));
|
||||||
$action = ($action=='add'?'create':'edit');
|
$action = ($action=='add'?'create':'edit');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1297,10 +1297,10 @@ else
|
|||||||
{
|
{
|
||||||
if (($j % 2) == 0) print '<tr>';
|
if (($j % 2) == 0) print '<tr>';
|
||||||
|
|
||||||
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY';
|
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY';
|
||||||
if(empty($conf->global->$idprof_mandatory))
|
if(empty($conf->global->$idprof_mandatory))
|
||||||
print '<td>'.$idprof.'</td><td>';
|
print '<td>'.$idprof.'</td><td>';
|
||||||
else
|
else
|
||||||
print '<td><span class="fieldrequired">'.$idprof.'</td><td>';
|
print '<td><span class="fieldrequired">'.$idprof.'</td><td>';
|
||||||
|
|
||||||
$key='idprof'.$i;
|
$key='idprof'.$i;
|
||||||
|
|||||||
@@ -1189,24 +1189,24 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
$hookmanager->initHooks(array('userdao'));
|
$hookmanager->initHooks(array('userdao'));
|
||||||
$parameters=array('socid'=>$this->id);
|
$parameters=array('socid'=>$this->id);
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
{
|
{
|
||||||
$result=$this->insertExtraFields();
|
$result=$this->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
|
|
||||||
if (! $error && ! $notrigger)
|
if (! $error && ! $notrigger)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ $langs->load("companies");
|
|||||||
$langs->load("ldap");
|
$langs->load("ldap");
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$object = new User($db);
|
$object = new User($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
|
||||||
@@ -187,13 +187,13 @@ if ($action == 'add' && $canadduser)
|
|||||||
$object->note = $_POST["note"];
|
$object->note = $_POST["note"];
|
||||||
$object->ldap_sid = $_POST["ldap_sid"];
|
$object->ldap_sid = $_POST["ldap_sid"];
|
||||||
|
|
||||||
// Get extra fields
|
// Get extra fields
|
||||||
foreach($_POST as $key => $value)
|
foreach($_POST as $key => $value)
|
||||||
{
|
{
|
||||||
if (preg_match("/^options_/",$key))
|
if (preg_match("/^options_/",$key))
|
||||||
{
|
{
|
||||||
$object->array_options[$key]=GETPOST($key);
|
$object->array_options[$key]=GETPOST($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME external module
|
// FIXME external module
|
||||||
@@ -315,13 +315,13 @@ if ($action == 'update' && ! $_POST["cancel"])
|
|||||||
$object->signature = $_POST["signature"];
|
$object->signature = $_POST["signature"];
|
||||||
$object->openid = $_POST["openid"];
|
$object->openid = $_POST["openid"];
|
||||||
|
|
||||||
// Get extra fields
|
// Get extra fields
|
||||||
foreach($_POST as $key => $value)
|
foreach($_POST as $key => $value)
|
||||||
{
|
{
|
||||||
if (preg_match("/^options_/",$key))
|
if (preg_match("/^options_/",$key))
|
||||||
{
|
{
|
||||||
$object->array_options[$key]=GETPOST($key);
|
$object->array_options[$key]=GETPOST($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME external module
|
// FIXME external module
|
||||||
@@ -530,8 +530,8 @@ if ($action == 'adduserldap')
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label('user');
|
$extralabels=$extrafields->fetch_name_optionals_label('user');
|
||||||
|
|
||||||
llxHeader('',$langs->trans("UserCard"));
|
llxHeader('',$langs->trans("UserCard"));
|
||||||
|
|
||||||
@@ -869,21 +869,21 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"');
|
$parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td';
|
print '<tr><td';
|
||||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
print '>'.$label.'</td><td colspan="3">';
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module Webcalendar
|
// Module Webcalendar
|
||||||
// TODO external module
|
// TODO external module
|
||||||
@@ -920,7 +920,7 @@ else
|
|||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
|
|
||||||
// Connexion ldap
|
// Connexion ldap
|
||||||
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
||||||
@@ -1883,21 +1883,21 @@ else
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="2"');
|
$parameters=array('colspan' => ' colspan="2"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td';
|
print '<tr><td';
|
||||||
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
print '>'.$label.'</td><td colspan="3">';
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user