From b87b997c7dfdac81b120b85187594329bc63924e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 May 2022 19:19:52 +0200 Subject: [PATCH] Debug v16 --- htdocs/core/class/html.form.class.php | 7 ++++++- .../eventorganization/conferenceorbooth_list.php | 8 +++++--- .../conferenceorboothattendee_list.php | 15 ++++++++++++--- htdocs/projet/card.php | 10 +++++++--- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 48a00919d65..05ac16fbfa6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -234,7 +234,11 @@ class Form if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata)) { $tmp = explode(':', $typeofdata); $ret .= ''; - } elseif (preg_match('/^(numeric|amount|integer)/', $typeofdata)) { + } elseif (preg_match('/^(integer)/', $typeofdata)) { + $tmp = explode(':', $typeofdata); + $valuetoshow = price2num($editvalue ? $editvalue : $value, 0); + $ret .= ''; + } elseif (preg_match('/^(numeric|amount)/', $typeofdata)) { $tmp = explode(':', $typeofdata); $valuetoshow = price2num($editvalue ? $editvalue : $value); $ret .= ''; @@ -280,6 +284,7 @@ class Form $ret .= ''; } + // Button save-cancel if (empty($notabletag)) { $ret .= ''; } diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 88dad1bbac0..6d42d881ab8 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -333,10 +333,12 @@ if ($projectid > 0) { // Visibility print ''.$langs->trans("Visibility").''; - if ($project->public) { - print $langs->trans('SharedProject'); + if ($project->public == 0) { + print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"'); + print $langs->trans("PrivateProject"); } else { - print $langs->trans('PrivateProject'); + print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); + print $langs->trans("SharedProject"); } print ''; diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index ee7fe97421a..878b1baf992 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -59,6 +59,7 @@ $conf_or_booth_id = GETPOST('conforboothid', 'int'); $withproject = GETPOST('withproject', 'int'); $fk_project = GETPOST('fk_project', 'int') ? GETPOST('fk_project', 'int') : GETPOST('projectid', 'int'); +$projectid = $fk_project; $withProjectUrl=''; @@ -459,10 +460,12 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { // Visibility print ''.$langs->trans("Visibility").''; - if ($projectstatic->public) { - print $langs->trans('SharedProject'); + if ($projectstatic->public == 0) { + print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"'); + print $langs->trans("PrivateProject"); } else { - print $langs->trans('PrivateProject'); + print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); + print $langs->trans("SharedProject"); } print ''; @@ -541,6 +544,12 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid'); print ""; + print ''; + print $form->editfieldkey($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', '', $projectstatic, $permissiontoadd, 'integer:3', '&withproject=1', 0, 0, 'projectid'); + print ''; + print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd, 'integer:3', '', 0, 0, '&withproject=1', 0, '', 'projectid'); + print ""; + print ''.$langs->trans("EventOrganizationICSLink").''; // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 873cb7ce82d..df50f0703e0 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -959,7 +959,9 @@ if ($action == 'create' && $user->rights->projet->creer) { // Opportunity amount print ''.$langs->trans("OpportunityAmount").''; - print ''; + print ''; + print $langs->getCurrencySymbol($conf->currency); + print ''; print ''; } @@ -970,7 +972,7 @@ if ($action == 'create' && $user->rights->projet->creer) { if ($comefromclone) { print ' checked '; } - print '/>'; + print '/>'; print ''; // Date end @@ -980,7 +982,9 @@ if ($action == 'create' && $user->rights->projet->creer) { // Budget print ''.$langs->trans("Budget").''; - print ''; + print ''; + print $langs->getCurrencySymbol($conf->currency); + print ''; print ''; // Description