Debug eventorganization modules
This commit is contained in:
parent
3709c6ff47
commit
ff29ac93ad
@ -271,7 +271,6 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
*/
|
*/
|
||||||
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
||||||
{
|
{
|
||||||
|
|
||||||
//TODO set percent according status
|
//TODO set percent according status
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -105,9 +105,9 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
|
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
|
||||||
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'),
|
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'),
|
||||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'),
|
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'),
|
||||||
'email' => array('type'=>'mail', 'label'=>'EmailAttendee', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
'email' => array('type'=>'mail', 'label'=>'EmailAttendee', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'autofocusoncreate'=>1),
|
||||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status = 1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>40, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'),
|
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status = 1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>40, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'),
|
||||||
'date_subscription' => array('type'=>'datetime', 'label'=>'DateOfRegistration', 'enabled'=>'1', 'position'=>56, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'1',),
|
'date_subscription' => array('type'=>'datetime', 'label'=>'DateOfRegistration', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1, 'showoncombobox'=>'1',),
|
||||||
'fk_invoice' => array('type'=>'integer:Facture:compta/facture/class/facture.class.php', 'label'=>'Invoice', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>-1, 'index'=>0, 'picto'=>'bill', 'css'=>'tdoverflowmax150 maxwidth500'),
|
'fk_invoice' => array('type'=>'integer:Facture:compta/facture/class/facture.class.php', 'label'=>'Invoice', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>-1, 'index'=>0, 'picto'=>'bill', 'css'=>'tdoverflowmax150 maxwidth500'),
|
||||||
'amount' => array('type'=>'price', 'label'=>'AmountPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",),
|
'amount' => array('type'=>'price', 'label'=>'AmountPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",),
|
||||||
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>3,),
|
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>3,),
|
||||||
|
|||||||
@ -57,9 +57,10 @@ $projectstatic = new Project($db);
|
|||||||
$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('conferenceorboothattendeecard', 'globalcard')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array('conferenceorboothattendeecard', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
|
|
||||||
if ($conf_or_booth_id > 0) {
|
if ($conf_or_booth_id > 0) {
|
||||||
$confOrBooth = new ConferenceOrBooth($db);
|
$confOrBooth = new ConferenceOrBooth($db);
|
||||||
$result = $confOrBooth->fetch($conf_or_booth_id);
|
$result = $confOrBooth->fetch($id > 0 ? $id : $conf_or_booth_id);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages(null, $confOrBooth->errors, 'errors');
|
setEventMessages(null, $confOrBooth->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
@ -102,6 +103,10 @@ if (empty($action) && empty($id) && empty($ref)) {
|
|||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
|
// Now we have loaded the attendee, we can force the project (in case value provided as parameter is wrong or value not provided)
|
||||||
|
if ($object->fk_project > 0) {
|
||||||
|
$fk_project = $object->fk_project;
|
||||||
|
}
|
||||||
|
|
||||||
$permissiontoread = $user->rights->eventorganization->read;
|
$permissiontoread = $user->rights->eventorganization->read;
|
||||||
$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
@ -657,16 +662,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
// Send
|
// Send
|
||||||
if (empty($user->socid)) {
|
if (empty($user->socid)) {
|
||||||
print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=presend&mode=init#formmailbeforetitle');
|
print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle');
|
||||||
}
|
}
|
||||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=edit', '', $permissiontoadd);
|
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=edit&token='.newToken(), '', $permissiontoadd);
|
||||||
|
|
||||||
// Clone
|
// Clone
|
||||||
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd);
|
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontoadd);
|
||||||
|
|
||||||
|
|
||||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete', '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
|
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
|
||||||
}
|
}
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -699,7 +699,8 @@ print '<input type="hidden" name="withproject" value="'.$withproject.'">';
|
|||||||
print '<input type="hidden" name="fk_project" value="'.$fk_project.'">';
|
print '<input type="hidden" name="fk_project" value="'.$fk_project.'">';
|
||||||
print '<input type="hidden" name="page_y" value="">';
|
print '<input type="hidden" name="page_y" value="">';
|
||||||
|
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd);
|
$params = array('morecss'=>'reposition');
|
||||||
|
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd, $params);
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
|
|||||||
@ -136,6 +136,7 @@ OrganizationEventPaymentOfBoothWasReceived=Your payment for your booth has been
|
|||||||
OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event registration has been recorded
|
OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event registration has been recorded
|
||||||
OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee
|
OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee
|
||||||
OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker
|
OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker
|
||||||
|
OrganizationEventLinkToThirdParty=Link to third party (customer, supplier or partner)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Vote page
|
# Vote page
|
||||||
@ -153,7 +154,7 @@ ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an e
|
|||||||
Attendee = Attendee
|
Attendee = Attendee
|
||||||
PaymentConferenceAttendee = Conference attendee payment
|
PaymentConferenceAttendee = Conference attendee payment
|
||||||
PaymentBoothLocation = Booth location payment
|
PaymentBoothLocation = Booth location payment
|
||||||
|
DeleteConferenceOrBoothAttendee=Remove attendee
|
||||||
RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email <b>%s</b>
|
RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email <b>%s</b>
|
||||||
EmailAttendee=Attendee email
|
EmailAttendee=Attendee email
|
||||||
EmailCompanyForInvoice=Company email (for invoice, if different of attendee email)
|
EmailCompanyForInvoice=Company email (for invoice, if different of attendee email)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user