diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index abdb098eb7d..93cf562d7c1 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -204,7 +204,7 @@ function project_prepare_head(Project $project)
$h++;
}
- if ($conf->eventorganization->enabled) {
+ if ($conf->eventorganization->enabled && !empty($project->usage_organize_event)) {
$langs->load('eventorganization');
$head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id;
$head[$h][1] = $langs->trans("ConferenceOrBoothTab");
diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php
index 0e661c6e078..4b7821c2dad 100644
--- a/htdocs/core/tpl/commonfields_view.tpl.php
+++ b/htdocs/core/tpl/commonfields_view.tpl.php
@@ -70,7 +70,7 @@ foreach ($object->fields as $key => $val) {
print $langs->trans($val['label']);
}
print '';
- print '
id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
//$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
//unset($object->fields['fk_project']); // Hide field already shown in banner
//unset($object->fields['fk_soc']); // Hide field already shown in banner
+ $link = 'http://localhost/dolibarr/htdocs/public/members/attendee_subscription.php';
+ $object->fields['pubregister'] = array('type'=>'text', 'label'=>'Lien public d\'enregistrement à une conférence', 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1);
+ $object->pubregister = $link;
+ $keyforbreak='pubregister';
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
-
+ //var_dump($object);
// Other attributes. Fields from hook formObjectOptions and Extrafields.
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
diff --git a/htdocs/public/members/attendee_subscription.php b/htdocs/public/members/attendee_subscription.php
new file mode 100644
index 00000000000..873742f99b9
--- /dev/null
+++ b/htdocs/public/members/attendee_subscription.php
@@ -0,0 +1,745 @@
+
+ * Copyright (C) 2001-2002 Jean-Louis Bergamo
+ * Copyright (C) 2006-2013 Laurent Destailleur
+ * Copyright (C) 2012 Regis Houssin
+ * Copyright (C) 2012 J. Fernando Lagrange
+ * Copyright (C) 2018-2019 Frédéric France
+ * Copyright (C) 2018 Alexandre Spangaro
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file htdocs/public/members/new.php
+ * \ingroup member
+ * \brief Example of form to add a new member
+ *
+ * Note that you can add following constant to change behaviour of page
+ * MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form
+ * MEMBER_NEWFORM_EDITAMOUNT 0 or 1 = Amount can be edited
+ * MEMBER_NEWFORM_PAYONLINE Suggest payment with paypal, paybox or stripe
+ * MEMBER_NEWFORM_DOLIBARRTURNOVER Show field turnover (specific for dolibarr foundation)
+ * MEMBER_URL_REDIRECT_SUBSCRIPTION Url to redirect once subscribe submitted
+ * MEMBER_NEWFORM_FORCETYPE Force type of member
+ * MEMBER_NEWFORM_FORCEMORPHY Force nature of member (mor/phy)
+ * MEMBER_NEWFORM_FORCECOUNTRYCODE Force country
+ */
+
+if (!defined('NOLOGIN')) {
+ define("NOLOGIN", 1); // This means this output page does not require to be logged.
+}
+if (!defined('NOCSRFCHECK')) {
+ define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
+}
+if (!defined('NOIPCHECK')) {
+ define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
+}
+if (!defined('NOBROWSERNOTIF')) {
+ define('NOBROWSERNOTIF', '1');
+}
+if (!defined('NOIPCHECK')) {
+ define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
+}
+
+// For MultiCompany module.
+// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
+// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
+$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
+if (is_numeric($entity)) {
+ define("DOLENTITY", $entity);
+}
+
+require '../../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
+require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
+
+// Init vars
+$errmsg = '';
+$num = 0;
+$error = 0;
+$backtopage = GETPOST('backtopage', 'alpha');
+$action = GETPOST('action', 'aZ09');
+
+// Load translation files
+$langs->loadLangs(array("main", "members", "companies", "install", "other"));
+
+/* Security check
+if (empty($conf->adherent->enabled)) {
+ accessforbidden('', 0, 0, 1);
+}
+
+if (empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
+ print $langs->trans("Auto subscription form for public visitors has not been enabled");
+ exit;
+}*/
+
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('publicnewmembercard', 'globalcard'));
+
+$extrafields = new ExtraFields($db);
+
+$object = new Adherent($db);
+
+$user->loadDefaultValues();
+
+
+/**
+ * Show header for new member
+ *
+ * @param string $title Title
+ * @param string $head Head array
+ * @param int $disablejs More content into html header
+ * @param int $disablehead More content into html header
+ * @param array $arrayofjs Array of complementary js files
+ * @param array $arrayofcss Array of complementary css files
+ * @return void
+ */
+function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '')
+{
+ global $user, $conf, $langs, $mysoc;
+
+ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
+
+ print '';
+
+ // Define urllogo
+ $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png';
+
+ if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) {
+ $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small);
+ } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) {
+ $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
+ } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) {
+ $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
+ }
+
+ print '';
+ // Output html code for logo
+ if ($urllogo) {
+ print ' ';
+ print ' ';
+ print '  ';
+ print ' ';
+ if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
+ print ' ';
+ }
+ print ' ';
+ }
+ print ' ';
+
+ print '';
+}
+
+/**
+ * Show footer for new member
+ *
+ * @return void
+ */
+function llxFooterVierge()
+{
+ print ' ';
+
+ printCommonFooter('public');
+
+ print "\n";
+ print " |