remove not use code that implementd error
This commit is contained in:
parent
03fcda6b43
commit
dd9402960d
@ -982,28 +982,6 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
$this->initAsSpecimenCommon();
|
$this->initAsSpecimenCommon();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create an array of lines
|
|
||||||
*
|
|
||||||
* @return array|int array of lines if OK, <0 if KO
|
|
||||||
*/
|
|
||||||
public function getLinesArray()
|
|
||||||
{
|
|
||||||
$this->lines = array();
|
|
||||||
|
|
||||||
$objectline = new ConferenceOrBoothAttendeeLine($this->db);
|
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorboothattendee = '.((int) $this->id)));
|
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
|
||||||
$this->error = $this->error;
|
|
||||||
$this->errors = $this->errors;
|
|
||||||
return $result;
|
|
||||||
} else {
|
|
||||||
$this->lines = $result;
|
|
||||||
return $this->lines;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the reference to the following non used object depending on the active numbering module.
|
* Returns the reference to the following non used object depending on the active numbering module.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -590,58 +590,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Lines
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!empty($object->table_element_line)) {
|
|
||||||
// Show object lines
|
|
||||||
$result = $object->getLinesArray();
|
|
||||||
|
|
||||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">
|
|
||||||
<input type="hidden" name="token" value="' . newToken().'">
|
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
|
||||||
<input type="hidden" name="mode" value="">
|
|
||||||
<input type="hidden" name="page_y" value="">
|
|
||||||
<input type="hidden" name="id" value="' . $object->id.'">
|
|
||||||
';
|
|
||||||
|
|
||||||
if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
|
||||||
if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
|
|
||||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($object->lines)) {
|
|
||||||
$object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Form to add new line
|
|
||||||
if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') {
|
|
||||||
if ($action != 'editline') {
|
|
||||||
// Add products/services form
|
|
||||||
|
|
||||||
$parameters = array();
|
|
||||||
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
|
||||||
if (empty($reshook))
|
|
||||||
$object->formAddObjectLine(1, $mysoc, $soc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
|
|
||||||
print '</table>';
|
|
||||||
}
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print "</form>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Buttons for actions
|
// Buttons for actions
|
||||||
|
|
||||||
if ($action != 'presend' && $action != 'editline') {
|
if ($action != 'presend' && $action != 'editline') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user