Debug v16
This commit is contained in:
parent
d44da58083
commit
5d2d0384f8
@ -622,34 +622,33 @@ $sourceList = array();
|
||||
if ($id == 11) {
|
||||
$elementList = array(
|
||||
'' => '',
|
||||
'societe' => $langs->trans('ThirdParty'),
|
||||
'agenda' => img_picto('', 'action', 'class="pictofixedwidth"').$langs->trans('Agenda'),
|
||||
'dolresource' => img_picto('', 'resource', 'class="pictofixedwidth"').$langs->trans('Resource'),
|
||||
'societe' => img_picto('', 'company', 'class="pictofixedwidth"').$langs->trans('ThirdParty'),
|
||||
// 'proposal' => $langs->trans('Proposal'),
|
||||
// 'order' => $langs->trans('Order'),
|
||||
// 'invoice' => $langs->trans('Bill'),
|
||||
'supplier_proposal' => $langs->trans('SupplierProposal'),
|
||||
'order_supplier' => $langs->trans('SupplierOrder'),
|
||||
'invoice_supplier' => $langs->trans('SupplierBill'),
|
||||
// 'intervention' => $langs->trans('InterventionCard'),
|
||||
// 'contract' => $langs->trans('Contract'),
|
||||
'project' => $langs->trans('Project'),
|
||||
'project_task' => $langs->trans('Task'),
|
||||
'ticket' => $langs->trans('Ticket'),
|
||||
'agenda' => $langs->trans('Agenda'),
|
||||
'dolresource' => $langs->trans('Resource'),
|
||||
// old deprecated
|
||||
'propal' => $langs->trans('Proposal'),
|
||||
'commande' => $langs->trans('Order'),
|
||||
'facture' => $langs->trans('Bill'),
|
||||
'fichinter' => $langs->trans('InterventionCard'),
|
||||
'contrat' => $langs->trans('Contract'),
|
||||
'project' => img_picto('', 'project', 'class="pictofixedwidth"').$langs->trans('Project'),
|
||||
'project_task' => img_picto('', 'projecttask', 'class="pictofixedwidth"').$langs->trans('Task'),
|
||||
'propal' => img_picto('', 'propal', 'class="pictofixedwidth"').$langs->trans('Proposal'),
|
||||
'commande' => img_picto('', 'order', 'class="pictofixedwidth"').$langs->trans('Order'),
|
||||
'facture' => img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans('Bill'),
|
||||
'fichinter' => img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterventionCard'),
|
||||
'contrat' => img_picto('', 'contract', 'class="pictofixedwidth"').$langs->trans('Contract'),
|
||||
'ticket' => img_picto('', 'ticket', 'class="pictofixedwidth"').$langs->trans('Ticket'),
|
||||
'supplier_proposal' => img_picto('', 'supplier_proposal', 'class="pictofixedwidth"').$langs->trans('SupplierProposal'),
|
||||
'order_supplier' => img_picto('', 'supplier_order', 'class="pictofixedwidth"').$langs->trans('SupplierOrder'),
|
||||
'invoice_supplier' => img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans('SupplierBill'),
|
||||
);
|
||||
if (!empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) {
|
||||
$elementList["societe"] = $langs->trans('ThirdParty');
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
$elementList['conferenceorbooth'] = img_picto('', 'eventorganization', 'class="pictofixedwidth"').$langs->trans('ConferenceOrBooth');
|
||||
}
|
||||
|
||||
complete_elementList_with_modules($elementList);
|
||||
|
||||
asort($elementList);
|
||||
//asort($elementList);
|
||||
$sourceList = array(
|
||||
'internal' => $langs->trans('Internal'),
|
||||
'external' => $langs->trans('External')
|
||||
@ -1202,7 +1201,6 @@ if (GETPOST('from')) {
|
||||
if ($action == 'delete') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
|
||||
/*
|
||||
@ -1960,7 +1958,7 @@ if ($id > 0) {
|
||||
$valuetoshow = price($valuetoshow);
|
||||
}
|
||||
if ($value == 'private') {
|
||||
$valuetoshow = yn($elementList[$valuetoshow]);
|
||||
$valuetoshow = yn($valuetoshow);
|
||||
} elseif ($value == 'libelle_facture') {
|
||||
$langs->load("bills");
|
||||
$key = $langs->trans("PaymentCondition".strtoupper($obj->code));
|
||||
@ -2376,8 +2374,14 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
|
||||
print '</td>';
|
||||
} elseif (in_array($value, array('element', 'source'))) { // Example: the type and source of the element (for contact types)
|
||||
$tmparray = array();
|
||||
if ($value == 'element') {
|
||||
$tmparray = $elementList;
|
||||
} else {
|
||||
$tmparray = $sourceList;
|
||||
}
|
||||
print '<td>';
|
||||
print $form->selectarray($value, $elementList, (!empty($obj->{$value}) ? $obj->{$value}:''));
|
||||
print $form->selectarray($value, $tmparray, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0, '', 0, 0, 0, '', 'maxwidth250');
|
||||
print '</td>';
|
||||
} elseif (in_array($value, array('public', 'use_default'))) {
|
||||
// Fields 0/1 with a combo select Yes/No
|
||||
|
||||
@ -258,7 +258,7 @@ class modEventOrganization extends DolibarrModules
|
||||
'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'New',
|
||||
'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1',
|
||||
'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1&usage_opportunity=0',
|
||||
'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>1000+$r,
|
||||
'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
|
||||
@ -185,7 +185,9 @@ if (!empty($withproject)) {
|
||||
// Tabs for project
|
||||
$tab = 'eventorganisation';
|
||||
$withProjectUrl = "&withproject=1";
|
||||
|
||||
$head = project_prepare_head($projectstatic);
|
||||
|
||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
||||
|
||||
$param = ($mode == 'mine' ? '&mode=mine' : '');
|
||||
@ -468,6 +470,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$res = $object->fetch_optionals();
|
||||
|
||||
$head = conferenceorboothPrepareHead($object, $withproject);
|
||||
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
@ -947,7 +947,7 @@ if ($num == 0) {
|
||||
$colspan++;
|
||||
}
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -47,12 +47,12 @@ function conferenceorboothPrepareHead($object, $with_project = 0)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
/*
|
||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
|
||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
*/
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
|
||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
}
|
||||
|
||||
/*
|
||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?conforboothid='.$object->id.$withProjectUrl;
|
||||
|
||||
@ -563,7 +563,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print '<label for="usage_opportunity">'.$form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext).'</label>';
|
||||
print '<script>';
|
||||
@ -577,24 +577,28 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
jQuery(".classuseopportunity").hide();
|
||||
}
|
||||
});
|
||||
});';
|
||||
';
|
||||
if (GETPOSTISSET('usage_opportunity') && !GETPOST('usage_opportunity')) {
|
||||
print 'jQuery(".classuseopportunity").hide();';
|
||||
}
|
||||
print '});';
|
||||
print '</script>';
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
||||
print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>';
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
|
||||
print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '').'"> ';
|
||||
print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') ? ' checked="checked"' : '') : '').'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>';
|
||||
print '<br>';
|
||||
}
|
||||
if (!empty($conf->eventorganization->enabled)) {
|
||||
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> ';
|
||||
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') ? ' checked="checked"' : '') :'').'"> ';
|
||||
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||
print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
|
||||
}
|
||||
@ -734,7 +738,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
|
||||
print '</form>';
|
||||
|
||||
// Change probability from status
|
||||
// Change probability from status or role of project
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function change_percent()
|
||||
@ -744,7 +748,8 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
/*if (jQuery("#opp_percent_not_set").val() == "") */
|
||||
jQuery("#opp_percent").val(defaultpercent);
|
||||
}
|
||||
/*init_myfunc();*/
|
||||
|
||||
/*init_myfunc();*/
|
||||
jQuery("#opp_status").change(function() {
|
||||
change_percent();
|
||||
});
|
||||
@ -873,6 +878,8 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
jQuery(".classuseopportunity").hide();
|
||||
}
|
||||
});
|
||||
';
|
||||
print '
|
||||
});';
|
||||
print '</script>';
|
||||
print '<br>';
|
||||
|
||||
@ -101,7 +101,7 @@ $extrafields = new ExtraFields($db);
|
||||
$user->loadDefaultValues();
|
||||
|
||||
$cactioncomm = new CActionComm($db);
|
||||
$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='booth@eventorganization'");
|
||||
$arrayofconfboothtype = $cactioncomm->liste_array('', 'id', '', 0, "module='booth@eventorganization'");
|
||||
|
||||
// Security check
|
||||
if (empty($conf->eventorganization->enabled)) {
|
||||
@ -612,8 +612,8 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Type of event
|
||||
print '<tr><td>'.$langs->trans("EventType").'<span style="color: red">*</span></td>'."\n";
|
||||
print '<td>'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'</td>';
|
||||
print '<tr><td>'.$langs->trans("Format").'<span style="color: red">*</span></td>'."\n";
|
||||
print '<td>'.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).'</td>';
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("LabelOfBooth").'<span style="color: red">*</span></td>'."\n";
|
||||
print '</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
||||
|
||||
@ -102,7 +102,7 @@ $extrafields = new ExtraFields($db);
|
||||
$user->loadDefaultValues();
|
||||
|
||||
$cactioncomm = new CActionComm($db);
|
||||
$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='conference@eventorganization'");
|
||||
$arrayofconfboothtype = $cactioncomm->liste_array('', 'id', '', 0, "module='conference@eventorganization'");
|
||||
|
||||
// Security check
|
||||
if (empty($conf->eventorganization->enabled)) {
|
||||
@ -546,8 +546,8 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Type of event
|
||||
print '<tr><td>'.$langs->trans("EventType").'<span style="color: red">*</span></td>'."\n";
|
||||
print '<td>'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'</td>';
|
||||
print '<tr><td>'.$langs->trans("Format").'<span style="color: red">*</span></td>'."\n";
|
||||
print '<td>'.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).'</td>';
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("LabelOfconference").'<span style="color: red">*</span></td>'."\n";
|
||||
print '</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user