class="button" name="button_password" value="trans('SendNewPassword'); ?>" tabindex="4" />
+
class="button small" name="button_password" value="trans('SendNewPassword'); ?>" tabindex="4" />
diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php
index de991d50f4e..60c134661ce 100644
--- a/htdocs/delivery/class/delivery.class.php
+++ b/htdocs/delivery/class/delivery.class.php
@@ -166,11 +166,11 @@ class Delivery extends CommonObject
$sql .= ", fk_incoterms, location_incoterms";
$sql .= ") VALUES (";
$sql .= "'(PROV)'";
- $sql .= ", ".$conf->entity;
- $sql .= ", ".$this->socid;
+ $sql .= ", ".((int) $conf->entity);
+ $sql .= ", ".((int) $this->socid);
$sql .= ", '".$this->db->escape($this->ref_customer)."'";
$sql .= ", '".$this->db->idate($now)."'";
- $sql .= ", ".$user->id;
+ $sql .= ", ".((int) $user->id);
$sql .= ", ".($this->date_delivery ? "'".$this->db->idate($this->date_delivery)."'" : "null");
$sql .= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : "null");
$sql .= ", ".(!empty($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null");
diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php
index 85a95905073..792edbcc928 100644
--- a/htdocs/don/class/don.class.php
+++ b/htdocs/don/class/don.class.php
@@ -381,7 +381,7 @@ class Don extends CommonObject
$sql .= ", phone_mobile";
$sql .= ") VALUES (";
$sql .= "'".$this->db->idate($this->date ? $this->date : $now)."'";
- $sql .= ", ".$conf->entity;
+ $sql .= ", ".((int) $conf->entity);
$sql .= ", ".price2num($this->amount);
$sql .= ", ".($this->modepaymentid ? $this->modepaymentid : "null");
$sql .= ", ".($this->socid > 0 ? $this->socid : "null");
@@ -396,7 +396,7 @@ class Don extends CommonObject
$sql .= ", ".($this->fk_project > 0 ? (int) $this->fk_project : "null");
$sql .= ", ".(!empty($this->note_private) ? ("'".$this->db->escape($this->note_private)."'") : "NULL");
$sql .= ", ".(!empty($this->note_public) ? ("'".$this->db->escape($this->note_public)."'") : "NULL");
- $sql .= ", ".$user->id;
+ $sql .= ", ".((int) $user->id);
$sql .= ", null";
$sql .= ", '".$this->db->idate($this->date)."'";
$sql .= ", '".$this->db->escape(trim($this->email))."'";
diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php
index d3e30f8e8b9..fec27a91bee 100644
--- a/htdocs/eventorganization/class/conferenceorbooth.class.php
+++ b/htdocs/eventorganization/class/conferenceorbooth.class.php
@@ -246,7 +246,7 @@ class ConferenceOrBooth extends ActionComm
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
- $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.urlencode($id);
+ $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.urlencode($id).'&type=conf';
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index 45e241bd1c1..a35a508e6e0 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -103,7 +103,8 @@ class ConferenceOrBoothAttendee extends CommonObject
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'Attendee', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
- 'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>1, 'visible'=>0, 'index'=>1,),
+ 'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>0, 'index'=>1,),
+ 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>0, 'index'=>1,),
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
'date_subscription' => array('type'=>'datetime', 'label'=>'DateSubscription', 'enabled'=>'1', 'position'=>56, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'1',),
'amount' => array('type'=>'price', 'label'=>'AmountOfSubscriptionPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",),
@@ -403,7 +404,7 @@ class ConferenceOrBoothAttendee extends CommonObject
$sql = 'SELECT ';
$sql .= $this->getFieldList('t');
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
- $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm as a on a.id=t.fk_actioncomm";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm as a on a.id=t.fk_actioncomm";
if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
$sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')';
} else {
@@ -746,6 +747,10 @@ class ConferenceOrBoothAttendee extends CommonObject
$url .= '&conforboothid='.$this->fk_actioncomm;
}
+ if ($option == 'projectid') {
+ $url .= '&fk_project='.$this->fk_project.'&withproject=1';
+ }
+
if ($option == 'conforboothidproject') {
$url .= '&conforboothid='.$this->fk_actioncomm.'&withproject=1' ;
}
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 2595e805efd..f0bb4d25074 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
+require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
if ($conf->categorie->enabled) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
}
@@ -266,7 +267,7 @@ if ($projectid > 0) {
//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
$head = project_prepare_head($project);
- print dol_get_fiche_head($head, 'eventorganisation', $langs->trans("Project"), -1, ($project->public ? 'projectpub' : 'project'));
+ print dol_get_fiche_head($head, 'eventorganisation', $langs->trans("ConferenceOrBoothTab"), -1, ($project->public ? 'projectpub' : 'project'));
// Project card
$linkback = '
'.$langs->trans("BackToList").'';
@@ -440,10 +441,10 @@ if ($projectid > 0) {
// Link to the subscribe
print '
| ';
//print '';
- print $langs->trans("PublicAttendeeSubscriptionPage");
+ print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
//print '';
print ' | ';
- $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$project->id;
+ $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$project->id.'&type=global';
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 2);
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
//print '';
@@ -465,6 +466,12 @@ if ($projectid > 0) {
print dol_get_fiche_end();
}
+if (!empty($project->id)) {
+ $head = conferenceorboothProjectPrepareHead($project);
+ $tab = 'conferenceorbooth';
+ print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($project->public ? 'projectpub' : 'project'), 0, '', '');
+}
+
// Build and execute select
// --------------------------------------------------------------------
$sql = 'SELECT ';
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index 034df1fcae3..4813ce5e968 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -47,6 +47,7 @@ $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
//$lineid = GETPOST('lineid', 'int');
$conf_or_booth_id = GETPOST('conforboothid', 'int');
+$fk_project = GETPOST('fk_project', 'int');
$withproject = GETPOST('withproject', 'int');
// Initialize technical objects
@@ -174,7 +175,7 @@ $title = $langs->trans("ConferenceOrBoothAttendee");
$help_url = '';
llxHeader('', $title, $help_url);
-$result = $projectstatic->fetch($confOrBooth->fk_project);
+$result = $projectstatic->fetch(empty($confOrBooth->fk_project)?$fk_project:$confOrBooth->fk_project);
if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) {
$projectstatic->fetchComments();
}
@@ -343,10 +344,44 @@ if (!empty($withproject)) {
// Show message
$message = ' entity : "");
$message .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...');
- $message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').'';
+ $message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'';
print $message;
print " |
";
+ // Link to the submit vote/register page
+ print '
| ';
+ //print '';
+ print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
+ //print '';
+ print ' | ';
+ $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
+ $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
+ $linksuggest .= '&securekey='.urlencode($encodedsecurekey);
+ //print '';
+ //print ajax_autoselect("linkregister");
+ print ' |
';
+
+ // Link to the subscribe
+ print '
| ';
+ //print '';
+ print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
+ //print '';
+ print ' | ';
+ $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$projectstatic->id.'&type=global';
+ $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
+ $link_subscription .= '&securekey='.urlencode($encodedsecurekey);
+ //print '';
+ //print ajax_autoselect("linkregister");
+ print ' |
';
+
print '';
print '
';
@@ -370,6 +405,10 @@ if ($action == 'create') {
if ($confOrBooth->id > 0) {
print '
';
if ($backtopage) {
@@ -381,9 +420,6 @@ if ($action == 'create') {
print dol_get_fiche_head(array(), '');
- // Set some default values
- //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue';
-
print '