Browse Source

Debug v16

Laurent Destailleur 3 years ago
parent
commit
b87b997c7d

+ 6 - 1
htdocs/core/class/html.form.class.php

@@ -234,7 +234,11 @@ class Form
 				if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata)) {
 					$tmp = explode(':', $typeofdata);
 					$ret .= '<input type="text" id="'.$htmlname.'" name="'.$htmlname.'" value="'.($editvalue ? $editvalue : $value).'"'.($tmp[1] ? ' size="'.$tmp[1].'"' : '').' autofocus>';
-				} elseif (preg_match('/^(numeric|amount|integer)/', $typeofdata)) {
+				} elseif (preg_match('/^(integer)/', $typeofdata)) {
+					$tmp = explode(':', $typeofdata);
+					$valuetoshow = price2num($editvalue ? $editvalue : $value, 0);
+					$ret .= '<input type="text" id="'.$htmlname.'" name="'.$htmlname.'" value="'.$valuetoshow.'"'.($tmp[1] ? ' size="'.$tmp[1].'"' : '').' autofocus>';
+				} elseif (preg_match('/^(numeric|amount)/', $typeofdata)) {
 					$tmp = explode(':', $typeofdata);
 					$valuetoshow = price2num($editvalue ? $editvalue : $value);
 					$ret .= '<input type="text" id="'.$htmlname.'" name="'.$htmlname.'" value="'.($valuetoshow != '' ? price($valuetoshow) : '').'"'.($tmp[1] ? ' size="'.$tmp[1].'"' : '').' autofocus>';
@@ -280,6 +284,7 @@ class Form
 					$ret .= '</td>';
 				}
 
+				// Button save-cancel
 				if (empty($notabletag)) {
 					$ret .= '<td class="left">';
 				}

+ 5 - 3
htdocs/eventorganization/conferenceorbooth_list.php

@@ -333,10 +333,12 @@ if ($projectid > 0) {
 
 	// Visibility
 	print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
-	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 '</td></tr>';
 

+ 12 - 3
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 '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
-		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 '</td></tr>';
 
@@ -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 "</td></tr>";
 
+		print '<tr><td class="titlefield">';
+		print $form->editfieldkey($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', '', $projectstatic, $permissiontoadd, 'integer:3', '&withproject=1', 0, 0, 'projectid');
+		print '</td><td class="valuefield">';
+		print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd, 'integer:3', '', 0, 0, '&withproject=1', 0, '', 'projectid');
+		print "</td></tr>";
+
 		print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
 		// Define $urlwithroot
 		$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));

+ 7 - 3
htdocs/projet/card.php

@@ -959,7 +959,9 @@ if ($action == 'create' && $user->rights->projet->creer) {
 
 			// Opportunity amount
 			print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityAmount").'</td>';
-			print '<td><input size="5" type="text" name="opp_amount" value="'.(GETPOSTISSET('opp_amount') ? GETPOST('opp_amount') : (strcmp($object->opp_amount, '') ? price2num($object->opp_amount) : '')).'"></td>';
+			print '<td><input size="5" type="text" name="opp_amount" value="'.(GETPOSTISSET('opp_amount') ? GETPOST('opp_amount') : (strcmp($object->opp_amount, '') ? price2num($object->opp_amount) : '')).'">';
+			print $langs->getCurrencySymbol($conf->currency);
+			print '</td>';
 			print '</tr>';
 		}
 
@@ -970,7 +972,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
 		if ($comefromclone) {
 			print ' checked ';
 		}
-		print '/><label for="reportdate">'.$langs->trans("ProjectReportDate").'</label>';
+		print '/><label for="reportdate" class="opacitymedium">'.$langs->trans("ProjectReportDate").'</label>';
 		print '</td></tr>';
 
 		// Date end
@@ -980,7 +982,9 @@ if ($action == 'create' && $user->rights->projet->creer) {
 
 		// Budget
 		print '<tr><td>'.$langs->trans("Budget").'</td>';
-		print '<td><input size="5" type="text" name="budget_amount" value="'.(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : (strcmp($object->budget_amount, '') ? price2num($object->budget_amount) : '')).'"></td>';
+		print '<td><input size="5" type="text" name="budget_amount" value="'.(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : (strcmp($object->budget_amount, '') ? price2num($object->budget_amount) : '')).'">';
+		print $langs->getCurrencySymbol($conf->currency);
+		print '</td>';
 		print '</tr>';
 
 		// Description