diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 0a01a3f5996..a09d7aff6de 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -152,7 +152,7 @@ if (!$permissiontoread) accessforbidden(); * Actions */ -if (preg_match('/^set/', $action) && $projectid > 0) { +if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) { $project = new Project($db); //If "set" fields keys is in projects fields $project_attr=preg_replace('/^set/', '', $action); diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index a6ea42da346..39cd3e0aded 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -36,6 +36,7 @@ if ($conf->categorie->enabled) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } +global $dolibarr_main_url_root; // for other modules //dol_include_once('/othermodule/class/otherobject.class.php'); @@ -158,6 +159,24 @@ if (!$permissiontoread) accessforbidden(); * Actions */ +if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) { + $project = new Project($db); + //If "set" fields keys is in projects fields + $project_attr=preg_replace('/^set/', '', $action); + if (array_key_exists($project_attr, $project->fields)) { + $result = $project->fetch($projectid); + if ($result < 0) { + setEventMessages(null, $project->errors, 'errors'); + } else { + $project->{$project_attr}=GETPOST($project_attr); + $result=$project->update($user); + if ($result < 0) { + setEventMessages(null, $project->errors, 'errors'); + } + } + } +} + if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; @@ -494,7 +513,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print ""; } - print '