';
-llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
+llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
print '
'."\n";
print '
'."\n";
diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php
index e8b7ad44874..3db61f67129 100644
--- a/htdocs/public/project/suggestbooth.php
+++ b/htdocs/public/project/suggestbooth.php
@@ -377,7 +377,14 @@ if (empty($reshook) && $action == 'add') {
$error++;
$errmsg .= $conforbooth->error;
} else {
- // If this is a paying booth, we have to redirect to payment page and create an invoice
+ // Adding the contact to the project
+ /*$resultaddcontact = $conforbooth->add_contact($contact);
+ if ($resultaddcontact<0) {
+ $error++;
+ $errmsg .= $conforbooth->error;
+ } else {*/
+
+ // If this is a paying booth, we have to redirect to payment page and create an invoice
if (!empty(floatval($project->price_booth))) {
$productforinvoicerow = new Product($db);
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_BOOTH_LOCATION);
@@ -484,6 +491,7 @@ if (empty($reshook) && $action == 'add') {
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
}
}
+ //}
}
}
}
diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php
index 0483312e519..21cbe7d77bd 100644
--- a/htdocs/public/project/suggestconference.php
+++ b/htdocs/public/project/suggestconference.php
@@ -242,10 +242,6 @@ if (empty($reshook) && $action == 'add') {
$langs->load("errors");
$errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n";
}
- if (!GETPOST("country_id")) {
- $error++;
- $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."
\n";
- }
if (!$error) {
// Getting the thirdparty or creating it
@@ -377,22 +373,28 @@ if (empty($reshook) && $action == 'add') {
$error++;
$errmsg .= $conforbooth->error;
} else {
- // If this is a paying booth, we have to redirect to payment page and create an invoice
- $conforbooth->status = CONFERENCEORBOOTH::STATUS_SUGGESTED;
- $conforbooth->update($user);
- // Sending mail
- require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
- include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
- $formmail = new FormMail($db);
- // Set output language
- $outputlangs = new Translate('', $conf);
- $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
- // Load traductions files required by page
- $outputlangs->loadLangs(array("main", "members"));
- // Get email content from template
- $arraydefaultmessage = null;
+ // Adding the contact to the project
+ /*$resultaddcontact = $conforbooth->add_contact($contact);
+ if ($resultaddcontact<0) {
+ $error++;
+ $errmsg .= $conforbooth->error;
+ } else {*/
+ $conforbooth->status = CONFERENCEORBOOTH::STATUS_SUGGESTED;
+ $conforbooth->update($user);
- $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
+ // Sending mail
+ require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
+ $formmail = new FormMail($db);
+ // Set output language
+ $outputlangs = new Translate('', $conf);
+ $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
+ // Load traductions files required by page
+ $outputlangs->loadLangs(array("main", "members"));
+ // Get email content from template
+ $arraydefaultmessage = null;
+
+ $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
if (!empty($labeltouse)) {
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
}
@@ -402,26 +404,27 @@ if (empty($reshook) && $action == 'add') {
$msg = $arraydefaultmessage->content;
}
- $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty);
- complete_substitutions_array($substitutionarray, $outputlangs, $object);
+ $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty);
+ complete_substitutions_array($substitutionarray, $outputlangs, $object);
- $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
- $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
+ $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
+ $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
- $sendto = $thirdparty->email;
- $from = $conf->global->MAILING_EMAIL_FROM;
- $urlback = $_SERVER["REQUEST_URI"];
+ $sendto = $thirdparty->email;
+ $from = $conf->global->MAILING_EMAIL_FROM;
+ $urlback = $_SERVER["REQUEST_URI"];
- $ishtml = dol_textishtml($texttosend); // May contain urls
+ $ishtml = dol_textishtml($texttosend); // May contain urls
- $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml);
+ $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml);
- $result = $mailfile->sendfile();
+ $result = $mailfile->sendfile();
if ($result) {
dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment');
} else {
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
}
+ //}
}
}
}