diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php
index a57df57d782..53d27efeba2 100644
--- a/htdocs/admin/eventorganization.php
+++ b/htdocs/admin/eventorganization.php
@@ -54,12 +54,12 @@ $arrayofparameters = array(
'EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
//'EVENTORGANIZATION_FILTERATTENDEES_CAT'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
//'EVENTORGANIZATION_FILTERATTENDEES_TYPE'=>array('type'=>'thirdparty_type:', 'enabled'=>1),
- 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
- 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
- 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
- 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
- 'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
- 'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
+ 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
+ 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
+ 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
+ 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
+ 'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
+ 'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:conferenceorbooth', 'enabled'=>1),
'EVENTORGANIZATION_SECUREKEY'=>array('type'=>'securekey', 'enabled'=>1),
'SERVICE_BOOTH_LOCATION'=>array('type'=>'product', 'enabled'=>1),
'SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION'=>array('type'=>'product', 'enabled'=>1),
diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php
index ae35f3eb892..bb84bbe37bd 100644
--- a/htdocs/eventorganization/class/conferenceorbooth.class.php
+++ b/htdocs/eventorganization/class/conferenceorbooth.class.php
@@ -108,7 +108,7 @@ class ConferenceOrBooth extends ActionComm
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'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'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1::eventorganization', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,),
- 'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,),
+ 'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1),
'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1,),
'datep' => array('type'=>'datetime', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'2',),
'datep2' => array('type'=>'datetime', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'3',),
@@ -118,6 +118,7 @@ class ConferenceOrBooth extends ActionComm
'fk_user_mod' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('0'=>'EvntOrgDraft', '1'=>'EvntOrgSuggested', '2'=> 'EvntOrgConfirmed', '3' =>'EvntOrgNotQualified', '4' =>'EvntOrgDone', '9'=>'EvntOrgCancelled'),),
+ 'num_vote' => array('type'=>'smallint', 'label'=>'NbVotes', 'enabled'=>'1', 'position'=>1001, 'notnull'=>-1, 'visible'=>5, 'default'=>'0', 'index'=>0),
);
public $rowid;
public $id;
diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql
index acc09bad008..e2b1cd65077 100644
--- a/htdocs/install/mysql/data/llx_c_email_templates.sql
+++ b/htdocs/install/mysql/data/llx_c_email_templates.sql
@@ -35,9 +35,9 @@ INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private,
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__, \n\n__(YourCandidatureAnswerMessage)__ __ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n \n__(Sincerely)__ __USER_SIGNATURE__',null, 0);
-- Event organization
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__ __(Sincerely)__ __MYCOMPANY_NAME__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__ __(Sincerely)__ __MYCOMPANY_NAME__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index 335c257b224..f361e6bc192 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -86,6 +86,7 @@ DownloadICSLink = Download ICS link
EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference
SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location
SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference
+NbVotes=Number of votes
#
# Status
#
@@ -115,6 +116,9 @@ EvntOrgDuration = This conference starts on %s and ends on %s.
ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s.
BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s
EventType = Event type
+LabelOfBooth=Booth label
+LabelOfconference=Conference label
+ConferenceIsNotConfirmed=Subcription not available, conference is not confirmed yet
#
# Vote page
diff --git a/htdocs/public/eventorganization/attendee_subscription.php b/htdocs/public/eventorganization/attendee_subscription.php
index 19bb2007bda..afdfdb9f806 100644
--- a/htdocs/public/eventorganization/attendee_subscription.php
+++ b/htdocs/public/eventorganization/attendee_subscription.php
@@ -205,7 +205,7 @@ if ($reshook < 0) {
}
// Action called when page is submitted
-if (empty($reshook) && $action == 'add') {
+if (empty($reshook) && $action == 'add' && $conference->status==2) {
$error = 0;
$urlback = '';
@@ -473,25 +473,27 @@ print $langs->trans("EvntOrgWelcomeMessage", $conference->label);
print ' ';
print $langs->trans("EvntOrgDuration", dol_print_date($conference->datep), dol_print_date($conference->datef));
print '';
-
dol_htmloutput_errors($errmsg);
-// Print form
-print '
\n";
-print " ";
-print '';
-
-
llxFooterVierge();
$db->close();
diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php
index 6329441778f..3ab8e165c7e 100644
--- a/htdocs/public/project/suggestbooth.php
+++ b/htdocs/public/project/suggestbooth.php
@@ -405,6 +405,7 @@ if (empty($reshook) && $action == 'add') {
$facture->paye = 0;
$facture->date = dol_now();
$facture->cond_reglement_id = $contact->cond_reglement_id;
+ $facture->fk_project = $project->id;
if (empty($facture->cond_reglement_id)) {
$paymenttermstatic = new PaymentTerm($contact->db);
@@ -469,7 +470,7 @@ if (empty($reshook) && $action == 'add') {
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH;
if (!empty($labeltouse)) {
- $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
+ $arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $labeltouse, 1, '');
}
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
@@ -569,7 +570,7 @@ jQuery(document).ready(function () {
print ''."\n";
// Name
-print ''.$langs->trans("Lastname").' / '.$langs->trans("Label").'* ';
+print ''.$langs->trans("Lastname").'* ';
print ' lastname).'" autofocus="autofocus"> ';
print ' ';
// Email
@@ -577,21 +578,6 @@ print ''.$langs->trans("Email").'* '.$langs->trans("Company").'* ';
print ' '."\n";
-// Type of event
-print ''.$langs->trans("EventType").'* '."\n";
-print ''.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).' ';
-// Label
-print ''.$langs->trans("Label").'* '."\n";
-print ' '."\n";
-// Note
-print ''.$langs->trans("Note").'* '."\n";
-print ' '."\n";
-// Start Date
-print ''.$langs->trans("DateStart").'* '."\n";
-print ' '."\n";
-// End Date
-print ''.$langs->trans("DateEnd").'* '."\n";
-print ' '."\n";
// Address
print ''.$langs->trans("Address").' '."\n";
print ''.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).' '."\n";
@@ -603,9 +589,8 @@ print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'se
print '';
// Country
print ''.$langs->trans('Country');
-if (!empty(floatval($project->price_booth))) {
- print '* ';
-}
+print '* ';
+
print ' ';
$country_id = GETPOST('country_id');
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
@@ -635,6 +620,22 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
}
print ' ';
}
+// Type of event
+print ''.$langs->trans("EventType").'* '."\n";
+print ''.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).' ';
+// Label
+print ''.$langs->trans("LabelOfBooth").'* '."\n";
+print ' '."\n";
+// Note
+print ''.$langs->trans("Description").'* '."\n";
+print ''.dol_escape_htmltag(GETPOST('note', 'restricthtml'), 0, 1).' '."\n";
+// Start Date
+print ''.$langs->trans("DateStart").'* '."\n";
+print ' '."\n";
+// End Date
+print ''.$langs->trans("DateEnd").'* '."\n";
+print ' '."\n";
+
print "
\n";
diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php
index 00b093ba215..399969bc80d 100644
--- a/htdocs/public/project/suggestconference.php
+++ b/htdocs/public/project/suggestconference.php
@@ -409,7 +409,7 @@ if (empty($reshook) && $action == 'add') {
$labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF;
if (!empty($labeltouse)) {
- $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
+ $arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $labeltouse, 1, '');
}
if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
@@ -508,11 +508,11 @@ jQuery(document).ready(function () {
print ''."\n";
// Last Name
-print ''.$langs->trans("Lastname").' / '.$langs->trans("Label").'* ';
+print ''.$langs->trans("Lastname").'* ';
print ' lastname).'" autofocus="autofocus"> ';
print ' ';
// First Name
-print ''.$langs->trans("Firstname").' / '.$langs->trans("Label").'* ';
+print ''.$langs->trans("Firstname").'* ';
print ' firstname).'" autofocus="autofocus"> ';
print ' ';
// Email
@@ -520,21 +520,6 @@ print ''.$langs->trans("Email").'* '.$langs->trans("Company").'* ';
print ' '."\n";
-// Type of event
-print ''.$langs->trans("EventType").'* '."\n";
-print ''.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).' ';
-// Label
-print ''.$langs->trans("Label").'* '."\n";
-print ' '."\n";
-// Note
-print ''.$langs->trans("Note").'* '."\n";
-print ' '."\n";
-// Start Date
-print ''.$langs->trans("DateStart").' '."\n";
-print ' '."\n";
-// End Date
-print ''.$langs->trans("DateEnd").' '."\n";
-print ' '."\n";
// Address
print ''.$langs->trans("Address").' '."\n";
print ''.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).' '."\n";
@@ -574,6 +559,22 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
}
print '';
}
+// Type of event
+print ''.$langs->trans("EventType").'* '."\n";
+print ''.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).' ';
+// Label
+print ''.$langs->trans("LabelOfconference").'* '."\n";
+print ' '."\n";
+// Note
+print ''.$langs->trans("Description").'* '."\n";
+print ''.dol_escape_htmltag(GETPOST('note', 'restricthtml'), 0, 1).' '."\n";
+// Start Date
+print ''.$langs->trans("DateStart").' '."\n";
+print ' '."\n";
+// End Date
+print ''.$langs->trans("DateEnd").' '."\n";
+print ' '."\n";
+
print "
\n";