NEW: Migrate event organization extrafields admin pages to the unified page

Wire eventorganizationAdminPrepareHead() tabs to the unified admin/extrafields.php
controller and register the actioncomm / eventorganization_conferenceorboothattendee
elementtypes in the whitelist. Completes the wrapper-file removal committed
in ba9928de5a.
This commit is contained in:
Frédéric FRANCE 2026-08-11 17:47:52 +02:00
parent ba9928de5a
commit a1ddaa7d93
No known key found for this signature in database
GPG key ID: C06E4A9656127239
2 changed files with 24 additions and 2 deletions

View file

@ -396,5 +396,27 @@ function getExtrafieldsAdminMap()
'helpurl' => '',
'langs' => array('admin', 'other', 'ecm'),
),
'actioncomm' => array(
'headfunction' => 'eventorganizationAdminPrepareHead',
'headfile' => 'core/lib/eventorganization.lib.php',
'tabid' => 'eventorganization_extrafields',
'headlabel' => 'ExtraFields',
'textobject' => 'ConferenceOrBooth',
'headpicto' => 'eventorganization',
'title' => 'EventOrganizationSetup',
'helpurl' => '',
'langs' => array('eventorganization', 'admin'),
),
'eventorganization_conferenceorboothattendee' => array(
'headfunction' => 'eventorganizationAdminPrepareHead',
'headfile' => 'core/lib/eventorganization.lib.php',
'tabid' => 'conferenceorboothattendee_extrafields',
'headlabel' => 'ConferenceOrBoothAttendeeExtraFields',
'textobject' => 'ConferenceOrBoothAttendee',
'headpicto' => 'eventorganization',
'title' => 'EventOrganizationSetup',
'helpurl' => '',
'langs' => array('eventorganization', 'admin'),
),
);
}

View file

@ -46,7 +46,7 @@ function eventorganizationAdminPrepareHead()
$h++;
$head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confbooth_extrafields.php';
$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/extrafields.php', array('elementtype' => 'actioncomm'));
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("EventOrganizationConfOrBooth").")";
$nbExtrafields = $extrafields->attributes['actioncomm']['count'];
if ($nbExtrafields > 0) {
@ -55,7 +55,7 @@ function eventorganizationAdminPrepareHead()
$head[$h][2] = 'eventorganization_extrafields';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confboothattendee_extrafields.php';
$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/extrafields.php', array('elementtype' => 'eventorganization_conferenceorboothattendee'));
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Attendees").")";
$nbExtrafields = $extrafields->attributes['eventorganization_conferenceorboothattendee']['count'];
if ($nbExtrafields > 0) {