Merge remote-tracking branch 'upstream/develop' into 16a6
This commit is contained in:
commit
5a8b2c9560
Binary file not shown.
13
dev/resources/iso-normes/QR code for invoices.txt
Normal file
13
dev/resources/iso-normes/QR code for invoices.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
List of QR Code format we found on some invoices
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
* For SEPA QR payment Code format (Europe)
|
||||||
|
------------------------------------------
|
||||||
|
https://en.wikipedia.org/wiki/EPC_QR_code#Generators
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* For ZATCA QR Code format (Saudi Arabia)
|
||||||
|
-----------------------------------------
|
||||||
|
https://www.pwc.com/m1/en/services/tax/me-tax-legal-news/2021/saudi-arabia-guide-to-develop-compliant-qr-code-for-simplified-einvoices.html
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
Address format
|
||||||
|
|
||||||
https://bitboost.com/ref/international-address-formats.html#Formats
|
https://bitboost.com/ref/international-address-formats.html#Formats
|
||||||
|
|
||||||
https://www.upu.int/en/Postal-Solutions/Programmes-Services/Addressing-Solutions
|
https://www.upu.int/en/Postal-Solutions/Programmes-Services/Addressing-Solutions
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
Date and number format
|
||||||
|
----------------------
|
||||||
|
|
||||||
For languages:
|
For languages:
|
||||||
https://icu4c-demos.unicode.org/icu-bin/icudemos - Locale Explorer -> Error 404
|
https://icu4c-demos.unicode.org/icu-bin/icudemos - Locale Explorer -> Error 404
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
VAT Rates
|
||||||
|
---------
|
||||||
|
|
||||||
http://www.taxrates.cc/index.html
|
http://www.taxrates.cc/index.html
|
||||||
https://en.wikipedia.org/wiki/List_of_countries_by_tax_rates
|
https://en.wikipedia.org/wiki/List_of_countries_by_tax_rates
|
||||||
|
|
||||||
|
|||||||
@ -1090,15 +1090,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Pro phone
|
// Pro phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $soc->phone).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').'<input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $soc->phone).'"></td></tr>';
|
||||||
|
|
||||||
// Personal phone
|
// Personal phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePerso").'</td>';
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET('phone_perso') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').'<input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET('phone_perso') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
||||||
|
|
||||||
// Mobile phone
|
// Mobile phone
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning_mobile').' <input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').'<input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
@ -1286,11 +1286,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td>';
|
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td>';
|
||||||
print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET("member_email") ? GETPOST("member_email", '', 2) : $object->email).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_email', 'class="pictofixedwidth"').'<input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET("member_email") ? GETPOST("member_email", '', 2) : $object->email).'"></td></tr>';
|
||||||
|
|
||||||
// Website
|
// Website
|
||||||
print '<tr><td>'.$form->editfieldkey('Web', 'member_url', GETPOST('member_url', 'alpha'), $object, 0).'</td>';
|
print '<tr><td>'.$form->editfieldkey('Web', 'member_url', GETPOST('member_url', 'alpha'), $object, 0).'</td>';
|
||||||
print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="member_url" id="member_url" class="maxwidth200onsmartphone maxwidth500 widthcentpercentminusx " value="'.(GETPOSTISSET('member_url') ?GETPOST('member_url', 'alpha') : $object->url).'"></td></tr>';
|
print '<td>'.img_picto('', 'globe', 'class="pictofixedwidth"').'<input type="text" name="member_url" id="member_url" class="maxwidth200onsmartphone maxwidth500 widthcentpercentminusx " value="'.(GETPOSTISSET('member_url') ?GETPOST('member_url', 'alpha') : $object->url).'"></td></tr>';
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
||||||
@ -1324,15 +1324,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
// Pro phone
|
// Pro phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone" value="'.(GETPOSTISSET("phone") ? GETPOST("phone") : $object->phone).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').'<input type="text" name="phone" value="'.(GETPOSTISSET("phone") ? GETPOST("phone") : $object->phone).'"></td></tr>';
|
||||||
|
|
||||||
// Personal phone
|
// Personal phone
|
||||||
print '<tr><td>'.$langs->trans("PhonePerso").'</td>';
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone_perso" value="'.(GETPOSTISSET("phone_perso") ? GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').'<input type="text" name="phone_perso" value="'.(GETPOSTISSET("phone_perso") ? GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
|
||||||
|
|
||||||
// Mobile phone
|
// Mobile phone
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
||||||
print '<td>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').' <input type="text" name="phone_mobile" value="'.(GETPOSTISSET("phone_mobile") ? GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
print '<td>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').'<input type="text" name="phone_mobile" value="'.(GETPOSTISSET("phone_mobile") ? GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
|
|||||||
@ -2176,9 +2176,10 @@ class Adherent extends CommonObject
|
|||||||
$linkend = '';
|
$linkend = '';
|
||||||
|
|
||||||
if (!empty($this->photo)) {
|
if (!empty($this->photo)) {
|
||||||
$label .= '<div class="photointooltip">';
|
$label .= '<div class="photointooltip floatright">';
|
||||||
$label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small', 0, 1);
|
$label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1);
|
||||||
$label .= '</div><div style="clear: both;"></div>';
|
$label .= '</div>';
|
||||||
|
//$label .= '<div style="clear: both;"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$label .= '<div class="centpercent">';
|
$label .= '<div class="centpercent">';
|
||||||
|
|||||||
@ -490,7 +490,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table id="tablelineoffilters" class="noborder margintable noshadow">';
|
print '<table id="tablelineoffilters" class="noborder margintable noshadow">';
|
||||||
print '<tr class="liste_titre nodrag nodrop">';
|
print '<tr class="liste_titre nodrag nodrop">';
|
||||||
print '<td>'.$form->textwithpicto($langs->trans("Filters"), $langs->trans("EmailCollectorFilterDesc")).'</td><td></td><td></td>';
|
print '<td>'.img_picto('', 'filter', 'class="pictofixedwidth"').$form->textwithpicto($langs->trans("Filters"), $langs->trans("EmailCollectorFilterDesc")).'</td><td></td><td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Add filter
|
// Add filter
|
||||||
print '<tr class="oddeven nodrag nodrop">';
|
print '<tr class="oddeven nodrag nodrop">';
|
||||||
@ -575,7 +575,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table id="tablelines" class="noborder margintable noshadow">';
|
print '<table id="tablelines" class="noborder margintable noshadow">';
|
||||||
print '<tr class="liste_titre nodrag nodrop">';
|
print '<tr class="liste_titre nodrag nodrop">';
|
||||||
print '<td>'.$form->textwithpicto($langs->trans("EmailcollectorOperations"), $langs->trans("EmailcollectorOperationsDesc")).'</td><td></td><td></td><td></td>';
|
print '<td>'.img_picto('', 'technic', 'class="pictofixedwidth"').$form->textwithpicto($langs->trans("EmailcollectorOperations"), $langs->trans("EmailcollectorOperationsDesc")).'</td><td></td><td></td><td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Add operation
|
// Add operation
|
||||||
print '<tr class="oddeven nodrag nodrop">';
|
print '<tr class="oddeven nodrag nodrop">';
|
||||||
@ -583,17 +583,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$arrayoftypes = array(
|
$arrayoftypes = array(
|
||||||
'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
|
'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
|
||||||
'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
|
'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
|
||||||
'recordjoinpiece'=>$langs->trans('recordjoinpieceonobject'),
|
'recordjoinpiece'=>'AttachJoinedDocumentsToObject',
|
||||||
'recordevent'=>'RecordEvent');
|
'recordevent'=>'RecordEvent');
|
||||||
|
$arrayoftypesnocondition = $arrayoftypes;
|
||||||
if ($conf->projet->enabled) {
|
if ($conf->projet->enabled) {
|
||||||
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
|
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
|
||||||
}
|
}
|
||||||
|
$arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
|
||||||
if ($conf->ticket->enabled) {
|
if ($conf->ticket->enabled) {
|
||||||
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
|
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
|
||||||
}
|
}
|
||||||
|
$arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty';
|
||||||
if ($conf->recruitment->enabled) {
|
if ($conf->recruitment->enabled) {
|
||||||
$arrayoftypes['candidature'] = 'CreateCandidature';
|
$arrayoftypes['candidature'] = 'CreateCandidature';
|
||||||
}
|
}
|
||||||
|
$arrayoftypesnocondition['candidature'] = 'CreateCandidature';
|
||||||
|
|
||||||
// support hook for add action
|
// support hook for add action
|
||||||
$parameters = array('arrayoftypes' => $arrayoftypes);
|
$parameters = array('arrayoftypes' => $arrayoftypes);
|
||||||
@ -629,7 +633,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<tr class="drag drop oddeven" id="row-'.$ruleaction['id'].'">';
|
print '<tr class="drag drop oddeven" id="row-'.$ruleaction['id'].'">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<!-- type of action: '.$ruleaction['type'].' -->';
|
print '<!-- type of action: '.$ruleaction['type'].' -->';
|
||||||
print $langs->trans($arrayoftypes[$ruleaction['type']]);
|
if (array_key_exists($ruleaction['type'], $arrayoftypes)) {
|
||||||
|
print $langs->trans($arrayoftypes[$ruleaction['type']]);
|
||||||
|
} else {
|
||||||
|
if (array_key_exists($ruleaction['type'], $arrayoftypesnocondition)) {
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans($arrayoftypesnocondition[$ruleaction['type']]).' - '.$langs->trans("Disabled").'</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($ruleaction['type'], array('recordevent'))) {
|
if (in_array($ruleaction['type'], array('recordevent'))) {
|
||||||
print $form->textwithpicto('', $langs->transnoentitiesnoconv('IfTrackingIDFoundEventWillBeLinked'));
|
print $form->textwithpicto('', $langs->transnoentitiesnoconv('IfTrackingIDFoundEventWillBeLinked'));
|
||||||
} elseif (in_array($ruleaction['type'], array('loadthirdparty', 'loadandcreatethirdparty'))) {
|
} elseif (in_array($ruleaction['type'], array('loadthirdparty', 'loadandcreatethirdparty'))) {
|
||||||
|
|||||||
@ -1,119 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
|
|
||||||
*
|
|
||||||
* 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 <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/admin/system/index.php
|
|
||||||
* \brief Home page of system information
|
|
||||||
*/
|
|
||||||
|
|
||||||
require '../../main.inc.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array("admin", "user", "install"));
|
|
||||||
|
|
||||||
if (!$user->admin) {
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
// None
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* View
|
|
||||||
*/
|
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("SummarySystem"), '', 'title_setup');
|
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
|
|
||||||
$dolversion = version_dolibarr();
|
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$dolversion."</td></tr>\n";
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("OS")."</td></tr>\n";
|
|
||||||
$osversion = version_os();
|
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$osversion."</td></tr>\n";
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
// Serveur web
|
|
||||||
print '<table class="noborder centpercent">';
|
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("WebServer")."</td></tr>\n";
|
|
||||||
$apacheversion = version_webserver();
|
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$apacheversion."</td></tr>\n";
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
// Php
|
|
||||||
print '<table class="noborder centpercent">';
|
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("PHP")."</td></tr>\n";
|
|
||||||
$phpversion = version_php();
|
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
|
|
||||||
print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
// Database
|
|
||||||
print '<table class="noborder centpercent">';
|
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n";
|
|
||||||
$dblabel = $db::LABEL;
|
|
||||||
$dbversion = $db->getVersion();
|
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$dblabel." ".$dbversion."</td></tr>\n";
|
|
||||||
print '</table>';
|
|
||||||
// Add checks on database options
|
|
||||||
if ($db->type == 'pgsql') {
|
|
||||||
// Check option standard_conforming_strings is on
|
|
||||||
$paramarray = $db->getServerParametersValues('standard_conforming_strings');
|
|
||||||
// if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1)
|
|
||||||
// {
|
|
||||||
// $langs->load("errors");
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
// Browser
|
|
||||||
print '<table class="noborder centpercent">';
|
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Browser")."</td></tr>\n";
|
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("UserAgent")."</td><td>".$_SERVER["HTTP_USER_AGENT"]."</td></tr>\n";
|
|
||||||
print "<tr $bc[1]><td width=\"280\">".$langs->trans("Smartphone")."</td><td>".(($conf->browser->layout != 'phone') ? $langs->trans("No") : $langs->trans("Yes"))."</td></tr>\n";
|
|
||||||
print '</table>';
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
|
|
||||||
//print "<br>\n";
|
|
||||||
print info_admin($langs->trans("SystemInfoDesc")).'<br>';
|
|
||||||
|
|
||||||
// End of page
|
|
||||||
llxFooter();
|
|
||||||
$db->close();
|
|
||||||
@ -70,10 +70,10 @@ print '</tr>';
|
|||||||
|
|
||||||
foreach ($triggers as $trigger) {
|
foreach ($triggers as $trigger) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="tdtop" width="32">'.$trigger['picto'].'</td>';
|
print '<td class=" width="32">'.$trigger['picto'].'</td>';
|
||||||
print '<td class="tdtop">'.$trigger['file'].'</td>';
|
print '<td>'.$trigger['file'].'</td>';
|
||||||
print '<td valign="top" align="center">'.$trigger['status'].'</td>';
|
print '<td class="center">'.$trigger['status'].'</td>';
|
||||||
print '<td class="tdtop">';
|
print '<td>';
|
||||||
$text = $trigger['info'];
|
$text = $trigger['info'];
|
||||||
$text .= "<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
|
$text .= "<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
|
||||||
//$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
|
//$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
|
||||||
|
|||||||
@ -1404,9 +1404,10 @@ class Contact extends CommonObject
|
|||||||
$result = ''; $label = '';
|
$result = ''; $label = '';
|
||||||
|
|
||||||
if (!empty($this->photo) && class_exists('Form')) {
|
if (!empty($this->photo) && class_exists('Form')) {
|
||||||
$label .= '<div class="photointooltip">';
|
$label .= '<div class="photointooltip floatright">';
|
||||||
$label .= Form::showphoto('contact', $this, 0, 40, 0, '', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
$label .= Form::showphoto('contact', $this, 0, 40, 0, 'photoref', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
||||||
$label .= '</div><div style="clear: both;"></div>';
|
$label .= '</div>';
|
||||||
|
//$label .= '<div style="clear: both;"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Contact").'</u>';
|
$label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Contact").'</u>';
|
||||||
|
|||||||
@ -60,12 +60,15 @@ $SECUREKEY = GETPOST("securekey"); // Secure key
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$response = "";
|
$response = "";
|
||||||
|
|
||||||
// Check securitykey
|
|
||||||
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
|
||||||
$type = $mode;
|
$type = $mode;
|
||||||
$calculatedsecuritykey = dol_hash($securekeyseed.$type.$ref, '0');
|
|
||||||
|
|
||||||
if ($calculatedsecuritykey != $SECUREKEY) {
|
// Check securitykey
|
||||||
|
$securekeyseed = '';
|
||||||
|
if ($type == 'proposal') {
|
||||||
|
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dol_verifyHash($securekeyseed.$type.$ref, $SECUREKEY, '0')) {
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
@ -110,24 +113,39 @@ if ($action == "importSignature") {
|
|||||||
$return = file_put_contents($upload_dir.$filename, $data);
|
$return = file_put_contents($upload_dir.$filename, $data);
|
||||||
if ($return == false) {
|
if ($return == false) {
|
||||||
$error++;
|
$error++;
|
||||||
$response = 'error file_put_content';
|
$response = 'Error file_put_content: failed to create signature file.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
|
$newpdffilename = $upload_dir.$ref."_signed-".$date.".pdf";
|
||||||
|
|
||||||
$pdf = pdf_getInstance();
|
$pdf = pdf_getInstance();
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
$pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf");
|
$pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf"); // original PDF
|
||||||
|
|
||||||
$tppl = $pdf->importPage(1);
|
$tppl = $pdf->importPage(1);
|
||||||
$pdf->useTemplate($tppl);
|
$pdf->useTemplate($tppl);
|
||||||
$pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15);
|
$pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15); // FIXME Position will be wrong with non A4 format. Use a value from width and height of page minus relative offset.
|
||||||
$pdf->Close();
|
$pdf->Close();
|
||||||
$pdf->Output($upload_dir.$ref."_signed-".$date.".pdf", "F");
|
$pdf->Output($newpdffilename, "F");
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
|
// Index the new file and update the last_main_doc property of object.
|
||||||
|
$object->indexFile($newpdffilename, 1);
|
||||||
|
|
||||||
|
$online_sign_ip = getUserRemoteIP();
|
||||||
|
$online_sign_name = ''; // TODO Ask name on form to sign
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
||||||
$sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$object->note_private."', date_signature='".$db->idate(dol_now())."'";
|
$sql .= " SET fk_statut = ".((int) $object::STATUS_SIGNED).", note_private = '".$db->escape($object->note_private)."',";
|
||||||
|
$sql .= " date_signature = '".$db->idate(dol_now())."',";
|
||||||
|
$sql .= " online_sign_ip = '".$db->escape($online_sign_ip)."'";
|
||||||
|
if ($online_sign_name) {
|
||||||
|
$sql .= ", online_sign_name = '".$db->escape($online_sign_name)."'";
|
||||||
|
}
|
||||||
$sql .= " WHERE rowid = ".((int) $object->id);
|
$sql .= " WHERE rowid = ".((int) $object->id);
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|||||||
@ -811,6 +811,64 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build string for ZATCA QR Code (Arabi Saudia)
|
||||||
|
*
|
||||||
|
* @return string String for ZATCA QR Code
|
||||||
|
*/
|
||||||
|
public function buildZATCAQRString()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$tmplang = new Translate('', $conf);
|
||||||
|
$tmplang->setDefaultLang('en_US');
|
||||||
|
$tmplang->load("main");
|
||||||
|
|
||||||
|
$datestring = dol_print_date($this->date, 'dayhourrfc');
|
||||||
|
$pricewithtaxstring = price($this->total_ttc, 0, $tmplang, 0, -1, 2);
|
||||||
|
$pricetaxstring = price($this->total_tva, 0, $tmplang, 0, -1, 2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
$name = implode(unpack("H*", $this->thirdparty->name));
|
||||||
|
$vatnumber = implode(unpack("H*", $this->thirdparty->tva_intra));
|
||||||
|
$date = implode(unpack("H*", $datestring));
|
||||||
|
$pricewithtax = implode(unpack("H*", price2num($pricewithtaxstring, 2)));
|
||||||
|
$pricetax = implode(unpack("H*", $pricetaxstring));
|
||||||
|
|
||||||
|
var_dump(strlen($this->thirdparty->name));
|
||||||
|
var_dump(str_pad(dechex('9'), 2, '0', STR_PAD_LEFT));
|
||||||
|
var_dump($this->thirdparty->name);
|
||||||
|
var_dump(implode(unpack("H*", $this->thirdparty->name)));
|
||||||
|
var_dump(price($this->total_tva, 0, $tmplang, 0, -1, 2));
|
||||||
|
|
||||||
|
$s = '01'.str_pad(dechex(strlen($this->thirdparty->name)), 2, '0', STR_PAD_LEFT).$name;
|
||||||
|
$s .= '02'.str_pad(dechex(strlen($this->thirdparty->tva_intra)), 2, '0', STR_PAD_LEFT).$vatnumber;
|
||||||
|
$s .= '03'.str_pad(dechex(strlen($datestring)), 2, '0', STR_PAD_LEFT).$date;
|
||||||
|
$s .= '04'.str_pad(dechex(strlen($pricewithtaxstring)), 2, '0', STR_PAD_LEFT).$pricewithtax;
|
||||||
|
$s .= '05'.str_pad(dechex(strlen($pricetaxstring)), 2, '0', STR_PAD_LEFT).$pricetax;
|
||||||
|
$s .= ''; // Hash of xml invoice
|
||||||
|
$s .= ''; // ecda signature
|
||||||
|
$s .= ''; // ecda public key
|
||||||
|
$s .= ''; // ecda signature of public key stamp
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Using TLV format
|
||||||
|
$s = pack('C1', 1).pack('C1', strlen($this->thirdparty->name)).$this->thirdparty->name;
|
||||||
|
$s .= pack('C1', 2).pack('C1', strlen($this->thirdparty->tva_intra)).$this->thirdparty->tva_intra;
|
||||||
|
$s .= pack('C1', 3).pack('C1', strlen($datestring)).$date;
|
||||||
|
$s .= pack('C1', 4).pack('C1', strlen($pricewithtaxstring)).$pricewithtaxstring;
|
||||||
|
$s .= pack('C1', 5).pack('C1', strlen($pricetaxstring)).$pricetaxstring;
|
||||||
|
$s .= ''; // Hash of xml invoice
|
||||||
|
$s .= ''; // ecda signature
|
||||||
|
$s .= ''; // ecda public key
|
||||||
|
$s .= ''; // ecda signature of public key stamp
|
||||||
|
|
||||||
|
$s = base64_encode($s);
|
||||||
|
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5292,103 +5292,14 @@ abstract class CommonObject
|
|||||||
// Index file in database
|
// Index file in database
|
||||||
if (!empty($obj->result['fullpath'])) {
|
if (!empty($obj->result['fullpath'])) {
|
||||||
$destfull = $obj->result['fullpath'];
|
$destfull = $obj->result['fullpath'];
|
||||||
$upload_dir = dirname($destfull);
|
|
||||||
$destfile = basename($destfull);
|
|
||||||
$rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir);
|
|
||||||
|
|
||||||
if (!preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) { // If not a tmp dir
|
// Update the last_main_doc field into main object (if document generator has property ->update_main_doc_field set)
|
||||||
$filename = basename($destfile);
|
$update_main_doc_field = 0;
|
||||||
$rel_dir = preg_replace('/[\\/]$/', '', $rel_dir);
|
if (!empty($obj->update_main_doc_field)) {
|
||||||
$rel_dir = preg_replace('/^[\\/]/', '', $rel_dir);
|
$update_main_doc_field = 1;
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
|
|
||||||
$ecmfile = new EcmFiles($this->db);
|
|
||||||
$result = $ecmfile->fetch(0, '', ($rel_dir ? $rel_dir.'/' : '').$filename);
|
|
||||||
|
|
||||||
// Set the public "share" key
|
|
||||||
$setsharekey = false;
|
|
||||||
if ($this->element == 'propal') {
|
|
||||||
$useonlinesignature = 1; // Replace this with 1 when feature to make online signature is ok
|
|
||||||
if ($useonlinesignature) {
|
|
||||||
$setsharekey = true;
|
|
||||||
}
|
|
||||||
if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) {
|
|
||||||
$setsharekey = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($this->element == 'commande' && !empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) {
|
|
||||||
$setsharekey = true;
|
|
||||||
}
|
|
||||||
if ($this->element == 'facture' && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) {
|
|
||||||
$setsharekey = true;
|
|
||||||
}
|
|
||||||
if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
|
||||||
$setsharekey = true;
|
|
||||||
}
|
|
||||||
if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
|
||||||
$setsharekey = true;
|
|
||||||
}
|
|
||||||
if ($this->element == 'supplier_proposal' && !empty($conf->global->SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) {
|
|
||||||
$setsharekey = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($setsharekey) {
|
|
||||||
if (empty($ecmfile->share)) { // Because object not found or share not set yet
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
|
||||||
$ecmfile->share = getRandomPassword(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($result > 0) {
|
|
||||||
$ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content
|
|
||||||
$ecmfile->fullpath_orig = '';
|
|
||||||
$ecmfile->gen_or_uploaded = 'generated';
|
|
||||||
$ecmfile->description = ''; // indexed content
|
|
||||||
$ecmfile->keywords = ''; // keyword content
|
|
||||||
$result = $ecmfile->update($user);
|
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$ecmfile->entity = $conf->entity;
|
|
||||||
$ecmfile->filepath = $rel_dir;
|
|
||||||
$ecmfile->filename = $filename;
|
|
||||||
$ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content
|
|
||||||
$ecmfile->fullpath_orig = '';
|
|
||||||
$ecmfile->gen_or_uploaded = 'generated';
|
|
||||||
$ecmfile->description = ''; // indexed content
|
|
||||||
$ecmfile->keywords = ''; // keyword content
|
|
||||||
$ecmfile->src_object_type = $this->table_element; // $this->table_name is 'myobject' or 'mymodule_myobject'.
|
|
||||||
$ecmfile->src_object_id = $this->id;
|
|
||||||
|
|
||||||
$result = $ecmfile->create($user);
|
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*$this->result['fullname']=$destfull;
|
|
||||||
$this->result['filepath']=$ecmfile->filepath;
|
|
||||||
$this->result['filename']=$ecmfile->filename;*/
|
|
||||||
//var_dump($obj->update_main_doc_field);exit;
|
|
||||||
|
|
||||||
// Update the last_main_doc field into main object (if document generator has property ->update_main_doc_field set)
|
|
||||||
$update_main_doc_field = 0;
|
|
||||||
if (!empty($obj->update_main_doc_field)) {
|
|
||||||
$update_main_doc_field = 1;
|
|
||||||
}
|
|
||||||
if ($update_main_doc_field && !empty($this->table_element)) {
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath."/".$ecmfile->filename)."'";
|
|
||||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if (!$resql) {
|
|
||||||
dol_print_error($this->db);
|
|
||||||
} else {
|
|
||||||
$this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->indexFile($destfull, $update_main_doc_field);
|
||||||
} else {
|
} else {
|
||||||
dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING);
|
dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING);
|
||||||
}
|
}
|
||||||
@ -5417,6 +5328,115 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Index a file into the ECM database
|
||||||
|
*
|
||||||
|
* @param string $destfull Full path of file to index
|
||||||
|
* @param int $update_main_doc_field Update field main_doc file into table of object
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function indexFile($destfull, $update_main_doc_field)
|
||||||
|
{
|
||||||
|
global $conf, $user;
|
||||||
|
|
||||||
|
$upload_dir = dirname($destfull);
|
||||||
|
$destfile = basename($destfull);
|
||||||
|
$rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir);
|
||||||
|
|
||||||
|
if (!preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) { // If not a tmp dir
|
||||||
|
$filename = basename($destfile);
|
||||||
|
$rel_dir = preg_replace('/[\\/]$/', '', $rel_dir);
|
||||||
|
$rel_dir = preg_replace('/^[\\/]/', '', $rel_dir);
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
|
||||||
|
$ecmfile = new EcmFiles($this->db);
|
||||||
|
$result = $ecmfile->fetch(0, '', ($rel_dir ? $rel_dir.'/' : '').$filename);
|
||||||
|
|
||||||
|
// Set the public "share" key
|
||||||
|
$setsharekey = false;
|
||||||
|
if ($this->element == 'propal' || $this->element == 'proposal') {
|
||||||
|
if (!isset($conf->global->PROPOSAL_ALLOW_ONLINESIGN) || !empty($conf->global->PROPOSAL_ALLOW_ONLINESIGN)) {
|
||||||
|
$setsharekey = true; // feature to make online signature is not set or set to on (default)
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
|
$setsharekey = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($this->element == 'commande' && !empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
|
$setsharekey = true;
|
||||||
|
}
|
||||||
|
if ($this->element == 'facture' && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
|
$setsharekey = true;
|
||||||
|
}
|
||||||
|
if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
|
$setsharekey = true;
|
||||||
|
}
|
||||||
|
if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
|
$setsharekey = true;
|
||||||
|
}
|
||||||
|
if ($this->element == 'supplier_proposal' && !empty($conf->global->SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
|
$setsharekey = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($setsharekey) {
|
||||||
|
if (empty($ecmfile->share)) { // Because object not found or share not set yet
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||||
|
$ecmfile->share = getRandomPassword(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result > 0) {
|
||||||
|
$ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content
|
||||||
|
$ecmfile->fullpath_orig = '';
|
||||||
|
$ecmfile->gen_or_uploaded = 'generated';
|
||||||
|
$ecmfile->description = ''; // indexed content
|
||||||
|
$ecmfile->keywords = ''; // keyword content
|
||||||
|
$result = $ecmfile->update($user);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$ecmfile->entity = $conf->entity;
|
||||||
|
$ecmfile->filepath = $rel_dir;
|
||||||
|
$ecmfile->filename = $filename;
|
||||||
|
$ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content
|
||||||
|
$ecmfile->fullpath_orig = '';
|
||||||
|
$ecmfile->gen_or_uploaded = 'generated';
|
||||||
|
$ecmfile->description = ''; // indexed content
|
||||||
|
$ecmfile->keywords = ''; // keyword content
|
||||||
|
$ecmfile->src_object_type = $this->table_element; // $this->table_name is 'myobject' or 'mymodule_myobject'.
|
||||||
|
$ecmfile->src_object_id = $this->id;
|
||||||
|
|
||||||
|
$result = $ecmfile->create($user);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*$this->result['fullname']=$destfull;
|
||||||
|
$this->result['filepath']=$ecmfile->filepath;
|
||||||
|
$this->result['filename']=$ecmfile->filename;*/
|
||||||
|
//var_dump($obj->update_main_doc_field);exit;
|
||||||
|
|
||||||
|
if ($update_main_doc_field && !empty($this->table_element)) {
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath."/".$ecmfile->filename)."'";
|
||||||
|
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if (!$resql) {
|
||||||
|
dol_print_error($this->db);
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
$this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build thumb
|
* Build thumb
|
||||||
* @todo Move this into files.lib.php
|
* @todo Move this into files.lib.php
|
||||||
@ -7766,7 +7786,8 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= $extrafields->showSeparator($key, $this, ($colspan + 1), $display_type);
|
// if colspan=0 or 1, the second column is not extended, so the separator must be on 2 columns
|
||||||
|
$out .= $extrafields->showSeparator($key, $this, ($colspan ? $colspan + 1 : 2), $display_type);
|
||||||
} else {
|
} else {
|
||||||
$class = (!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : '');
|
$class = (!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : '');
|
||||||
$csstyle = '';
|
$csstyle = '';
|
||||||
@ -7865,6 +7886,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
||||||
if ($display_type == 'card') {
|
if ($display_type == 'card') {
|
||||||
|
// a first td column was already output (and may be another on before if MAIN_VIEW_LINE_NUMBER set), so this td is the next one
|
||||||
$out .= '<td '.($html_id ? 'id="'.$html_id.'" ' : '').' class="'.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
$out .= '<td '.($html_id ? 'id="'.$html_id.'" ' : '').' class="'.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||||
} elseif ($display_type == 'line') {
|
} elseif ($display_type == 'line') {
|
||||||
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="'.$this->element.'_extras_'.$key.'">';
|
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="'.$this->element.'_extras_'.$key.'">';
|
||||||
|
|||||||
@ -889,10 +889,6 @@ class Conf
|
|||||||
$this->global->MAIN_SIZE_SHORTLIST_LIMIT = 3;
|
$this->global->MAIN_SIZE_SHORTLIST_LIMIT = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->global->THEME_HIDE_BORDER_ON_INPUT)) {
|
|
||||||
$this->global->THEME_HIDE_BORDER_ON_INPUT = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save inconsistent option
|
// Save inconsistent option
|
||||||
if (empty($this->global->AGENDA_USE_EVENT_TYPE) && (!isset($this->global->AGENDA_DEFAULT_FILTER_TYPE) || $this->global->AGENDA_DEFAULT_FILTER_TYPE == 'AC_NON_AUTO')) {
|
if (empty($this->global->AGENDA_USE_EVENT_TYPE) && (!isset($this->global->AGENDA_DEFAULT_FILTER_TYPE) || $this->global->AGENDA_DEFAULT_FILTER_TYPE == 'AC_NON_AUTO')) {
|
||||||
$this->global->AGENDA_DEFAULT_FILTER_TYPE = '0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on.
|
$this->global->AGENDA_DEFAULT_FILTER_TYPE = '0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on.
|
||||||
|
|||||||
@ -8440,7 +8440,7 @@ class Form
|
|||||||
'order_supplier'=>array('enabled'=>$conf->supplier_order->enabled, 'perms'=>1, 'label'=>'LinkToSupplierOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande_fournisseur as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande_fournisseur').')'),
|
'order_supplier'=>array('enabled'=>$conf->supplier_order->enabled, 'perms'=>1, 'label'=>'LinkToSupplierOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande_fournisseur as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande_fournisseur').')'),
|
||||||
'invoice_supplier'=>array('enabled'=>$conf->supplier_invoice->enabled, 'perms'=>1, 'label'=>'LinkToSupplierInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('facture_fourn').')'),
|
'invoice_supplier'=>array('enabled'=>$conf->supplier_invoice->enabled, 'perms'=>1, 'label'=>'LinkToSupplierInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('facture_fourn').')'),
|
||||||
'ticket'=>array('enabled'=>$conf->ticket->enabled, 'perms'=>1, 'label'=>'LinkToTicket', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.track_id, '0' as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."ticket as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('ticket').')'),
|
'ticket'=>array('enabled'=>$conf->ticket->enabled, 'perms'=>1, 'label'=>'LinkToTicket', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.track_id, '0' as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."ticket as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('ticket').')'),
|
||||||
'mo'=>array('enabled'=>$conf->mrp->enabled, 'perms'=>1, 'label'=>'LinkToMO', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.rowid, '0' as total_ht FROM ".MAIN_DB_PREFIX."societe as s INNER JOIN ".MAIN_DB_PREFIX."mrp_mo as t ON t.fk_soc = s.rowid WHERE t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('mo').')')
|
'mo'=>array('enabled'=>$conf->mrp->enabled, 'perms'=>1, 'label'=>'LinkToMo', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.rowid, '0' as total_ht FROM ".MAIN_DB_PREFIX."societe as s INNER JOIN ".MAIN_DB_PREFIX."mrp_mo as t ON t.fk_soc = s.rowid WHERE t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('mo').')')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5020,7 +5020,6 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
|||||||
if ($cpt == $page) {
|
if ($cpt == $page) {
|
||||||
$pagelist .= '<li class="pagination"><input type="text" class="width25 center pageplusone" name="pageplusone" value="'.($page + 1).'"></li>';
|
$pagelist .= '<li class="pagination"><input type="text" class="width25 center pageplusone" name="pageplusone" value="'.($page + 1).'"></li>';
|
||||||
$pagelist .= '/';
|
$pagelist .= '/';
|
||||||
//if (($cpt + 1) < $nbpages) $pagelist .= '/';
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($cpt == $page) {
|
if ($cpt == $page) {
|
||||||
@ -5043,9 +5042,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//var_dump($page.' '.$cpt.' '.$nbpages);
|
//var_dump($page.' '.$cpt.' '.$nbpages);
|
||||||
//if (($page + 1) < $nbpages) {
|
$pagelist .= '<li class="pagination paginationlastpage"><a href="'.$file.'?page='.($nbpages - 1).$options.'">'.$nbpages.'</a></li>';
|
||||||
$pagelist .= '<li class="pagination"><a href="'.$file.'?page='.($nbpages - 1).$options.'">'.$nbpages.'</a></li>';
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$pagelist .= '<li class="pagination"><span class="active">'.($page + 1)."</li>";
|
$pagelist .= '<li class="pagination"><span class="active">'.($page + 1)."</li>";
|
||||||
|
|||||||
@ -213,14 +213,14 @@ function getHtmlOnlinePaymentLink($type, $ref, $label = '')
|
|||||||
* Return string with full Url
|
* Return string with full Url
|
||||||
*
|
*
|
||||||
* @param int $mode 0=True url, 1=Url formated with colors
|
* @param int $mode 0=True url, 1=Url formated with colors
|
||||||
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
|
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member', 'boothlocation', ...)
|
||||||
* @param string $ref Ref of object
|
* @param string $ref Ref of object
|
||||||
* @param int $amount Amount (required for $type='free' only)
|
* @param int $amount Amount (required and used for $type='free' only)
|
||||||
* @param string $freetag Free tag
|
* @param string $freetag Free tag (required and used for $type='free' only)
|
||||||
* @param string $localorexternal 0=Url for browser, 1=Url for external access
|
* @param string $localorexternal 0=Url for browser, 1=Url for external access
|
||||||
* @return string Url string
|
* @return string Url string
|
||||||
*/
|
*/
|
||||||
function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_tag', $localorexternal = 0)
|
function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_tag', $localorexternal = 1)
|
||||||
{
|
{
|
||||||
global $conf, $dolibarr_main_url_root;
|
global $conf, $dolibarr_main_url_root;
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
|||||||
}
|
}
|
||||||
//if ($mode) $out.='&noidempotency=1';
|
//if ($mode) $out.='&noidempotency=1';
|
||||||
} elseif ($type == 'order') {
|
} elseif ($type == 'order') {
|
||||||
$out = $urltouse.'/public/payment/newpayment.php?source=order&ref='.($mode ? '<span style="color: #666666">' : '');
|
$out = $urltouse.'/public/payment/newpayment.php?source='.$type.'&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$out .= 'order_ref';
|
$out .= 'order_ref';
|
||||||
}
|
}
|
||||||
@ -271,7 +271,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($type == 'invoice') {
|
} elseif ($type == 'invoice') {
|
||||||
$out = $urltouse.'/public/payment/newpayment.php?source=invoice&ref='.($mode ? '<span style="color: #666666">' : '');
|
$out = $urltouse.'/public/payment/newpayment.php?source='.$type.'&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$out .= 'invoice_ref';
|
$out .= 'invoice_ref';
|
||||||
}
|
}
|
||||||
@ -294,7 +294,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($type == 'contractline') {
|
} elseif ($type == 'contractline') {
|
||||||
$out = $urltouse.'/public/payment/newpayment.php?source=contractline&ref='.($mode ? '<span style="color: #666666">' : '');
|
$out = $urltouse.'/public/payment/newpayment.php?source='.$type.'&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$out .= 'contractline_ref';
|
$out .= 'contractline_ref';
|
||||||
}
|
}
|
||||||
@ -340,9 +340,8 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
|||||||
$out .= ($mode ? '</span>' : '');
|
$out .= ($mode ? '</span>' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($type == 'donation') {
|
||||||
if ($type == 'donation') {
|
$out = $urltouse.'/public/payment/newpayment.php?source='.$type.'&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||||
$out = $urltouse.'/public/payment/newpayment.php?source=donation&ref='.($mode ? '<span style="color: #666666">' : '');
|
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$out .= 'donation_ref';
|
$out .= 'donation_ref';
|
||||||
}
|
}
|
||||||
@ -364,6 +363,29 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
|
|||||||
$out .= ($mode ? '</span>' : '');
|
$out .= ($mode ? '</span>' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} elseif ($type == 'boothlocation') {
|
||||||
|
$out = $urltouse.'/public/payment/newpayment.php?source='.$type.'&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||||
|
if ($mode == 1) {
|
||||||
|
$out .= 'invoice_ref';
|
||||||
|
}
|
||||||
|
if ($mode == 0) {
|
||||||
|
$out .= urlencode($ref);
|
||||||
|
}
|
||||||
|
$out .= ($mode ? '</span>' : '');
|
||||||
|
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||||
|
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||||
|
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||||
|
} else {
|
||||||
|
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
|
||||||
|
if ($mode == 1) {
|
||||||
|
$out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + invoice_ref)";
|
||||||
|
}
|
||||||
|
if ($mode == 0) {
|
||||||
|
$out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2);
|
||||||
|
}
|
||||||
|
$out .= ($mode ? '</span>' : '');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For multicompany
|
// For multicompany
|
||||||
|
|||||||
@ -51,12 +51,13 @@ function showOnlineSignatureUrl($type, $ref)
|
|||||||
/**
|
/**
|
||||||
* Return string with full Url
|
* Return string with full Url
|
||||||
*
|
*
|
||||||
* @param int $mode 0=True url, 1=Url formated with colors
|
* @param int $mode 0=True url, 1=Url formated with colors
|
||||||
* @param string $type Type of URL ('proposal', ...)
|
* @param string $type Type of URL ('proposal', ...)
|
||||||
* @param string $ref Ref of object
|
* @param string $ref Ref of object
|
||||||
* @return string Url string
|
* @param string $localorexternal 0=Url for browser, 1=Url for external access
|
||||||
|
* @return string Url string
|
||||||
*/
|
*/
|
||||||
function getOnlineSignatureUrl($mode, $type, $ref = '')
|
function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
||||||
{
|
{
|
||||||
global $conf, $db, $langs, $dolibarr_main_url_root;
|
global $conf, $db, $langs, $dolibarr_main_url_root;
|
||||||
|
|
||||||
@ -68,16 +69,16 @@ function getOnlineSignatureUrl($mode, $type, $ref = '')
|
|||||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
|
|
||||||
$localorexternal = 1; // external
|
|
||||||
|
|
||||||
$urltouse = DOL_MAIN_URL_ROOT;
|
$urltouse = DOL_MAIN_URL_ROOT;
|
||||||
if ($localorexternal) {
|
if ($localorexternal) {
|
||||||
$urltouse = $urlwithroot;
|
$urltouse = $urlwithroot;
|
||||||
}
|
}
|
||||||
|
|
||||||
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
$securekeyseed = '';
|
||||||
|
|
||||||
if ($type == 'proposal') {
|
if ($type == 'proposal') {
|
||||||
|
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
||||||
|
|
||||||
$out = $urltouse.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '<span style="color: #666666">' : '');
|
$out = $urltouse.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '<span style="color: #666666">' : '');
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$out .= 'proposal_ref';
|
$out .= 'proposal_ref';
|
||||||
|
|||||||
@ -428,15 +428,54 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
|
|
||||||
|
// Output header (logo, ref and address blocks). This is first call for first page.
|
||||||
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
|
|
||||||
$tab_top = 90 + $top_shift;
|
// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
|
||||||
|
|
||||||
|
// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
|
||||||
|
$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
|
||||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||||
|
|
||||||
|
// You can add more thing under header here, if you increase $extra_under_address_shift too.
|
||||||
|
$extra_under_address_shift = 0;
|
||||||
|
if (! empty($conf->global->INVOICE_ADD_ZATCA_QR_CODE)) {
|
||||||
|
$qrcodestring = $object->buildZATCAQRString();
|
||||||
|
$qrcodecolor = array('25', '25', '25');
|
||||||
|
// set style for QR-code
|
||||||
|
$styleQr = array(
|
||||||
|
'border' => false,
|
||||||
|
'padding' => 0,
|
||||||
|
'fgcolor' => $qrcodecolor,
|
||||||
|
'bgcolor' => false, //array(255,255,255)
|
||||||
|
'module_width' => 1, // width of a single module in points
|
||||||
|
'module_height' => 1 // height of a single module in points
|
||||||
|
);
|
||||||
|
$pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $tab_top - 5, 25, 25, $styleQr, 'N');
|
||||||
|
$extra_under_address_shift += 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call hook printUnderHeaderPDFline
|
||||||
|
$parameters = array(
|
||||||
|
'object' => $object,
|
||||||
|
'i' => $i,
|
||||||
|
'pdf' =>& $pdf,
|
||||||
|
'outputlangs' => $outputlangs,
|
||||||
|
'hidedetails' => $hidedetails
|
||||||
|
);
|
||||||
|
$reshook = $hookmanager->executeHooks('printUnderHeaderPDFline', $parameters, $this); // Note that $object may have been modified by hook
|
||||||
|
if (!empty($hookmanager->resArray['extra_under_address_shift'])) {
|
||||||
|
$extra_under_address_shift += $hookmanager->resArray['extra_under_header_shift'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$tab_top += $extra_under_address_shift;
|
||||||
|
$tab_top_new_page += $extra_under_address_shift;
|
||||||
|
|
||||||
// Incoterm
|
// Incoterm
|
||||||
|
$height_incoterms = 0;
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (!empty($conf->incoterm->enabled)) {
|
||||||
$desc_incoterms = $object->getIncotermsForPDF();
|
$desc_incoterms = $object->getIncotermsForPDF();
|
||||||
if ($desc_incoterms) {
|
if ($desc_incoterms) {
|
||||||
@ -1644,7 +1683,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
* @param int $showaddress 0=no, 1=yes
|
* @param int $showaddress 0=no, 1=yes
|
||||||
* @param Translate $outputlangs Object lang for output
|
* @param Translate $outputlangs Object lang for output
|
||||||
* @param Translate $outputlangsbis Object lang for output bis
|
* @param Translate $outputlangsbis Object lang for output bis
|
||||||
* @return void
|
* @return int top shift of linked object lines
|
||||||
*/
|
*/
|
||||||
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
|
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -417,13 +417,47 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
|
|
||||||
// You can add more thing undr header here, if you increase top_shift too.
|
// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
|
||||||
// TODO
|
|
||||||
|
|
||||||
// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
|
// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
|
||||||
$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
|
$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
|
||||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||||
|
|
||||||
|
// You can add more thing under header here, if you increase $extra_under_address_shift too.
|
||||||
|
$extra_under_address_shift = 0;
|
||||||
|
if (! empty($conf->global->INVOICE_ADD_ZATCA_QR_CODE)) {
|
||||||
|
$qrcodestring = $object->buildZATCAQRString();
|
||||||
|
$qrcodecolor = array('25', '25', '25');
|
||||||
|
// set style for QR-code
|
||||||
|
$styleQr = array(
|
||||||
|
'border' => false,
|
||||||
|
'padding' => 0,
|
||||||
|
'fgcolor' => $qrcodecolor,
|
||||||
|
'bgcolor' => false, //array(255,255,255)
|
||||||
|
'module_width' => 1, // width of a single module in points
|
||||||
|
'module_height' => 1 // height of a single module in points
|
||||||
|
);
|
||||||
|
$pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $tab_top - 5, 25, 25, $styleQr, 'N');
|
||||||
|
$extra_under_address_shift += 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call hook printUnderHeaderPDFline
|
||||||
|
$parameters = array(
|
||||||
|
'object' => $object,
|
||||||
|
'i' => $i,
|
||||||
|
'pdf' =>& $pdf,
|
||||||
|
'outputlangs' => $outputlangs,
|
||||||
|
'hidedetails' => $hidedetails
|
||||||
|
);
|
||||||
|
$reshook = $hookmanager->executeHooks('printUnderHeaderPDFline', $parameters, $this); // Note that $object may have been modified by hook
|
||||||
|
if (!empty($hookmanager->resArray['extra_under_address_shift'])) {
|
||||||
|
$extra_under_address_shift += $hookmanager->resArray['extra_under_header_shift'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$tab_top += $extra_under_address_shift;
|
||||||
|
$tab_top_new_page += $extra_under_address_shift;
|
||||||
|
|
||||||
|
|
||||||
// Define heigth of table for lines (for first page)
|
// Define heigth of table for lines (for first page)
|
||||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||||
|
|
||||||
@ -1863,7 +1897,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
* @param int $showaddress 0=no, 1=yes (usually set to 1 for first page, and 0 for next pages)
|
* @param int $showaddress 0=no, 1=yes (usually set to 1 for first page, and 0 for next pages)
|
||||||
* @param Translate $outputlangs Object lang for output
|
* @param Translate $outputlangs Object lang for output
|
||||||
* @param Translate $outputlangsbis Object lang for output bis
|
* @param Translate $outputlangsbis Object lang for output bis
|
||||||
* @return void
|
* @return int top shift of linked object lines
|
||||||
*/
|
*/
|
||||||
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
|
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -220,6 +220,8 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
|
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
|
||||||
|
|
||||||
|
dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null'));
|
||||||
|
|
||||||
if (!is_object($outputlangs)) {
|
if (!is_object($outputlangs)) {
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
}
|
}
|
||||||
@ -228,13 +230,22 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$outputlangs->charset_output = 'ISO-8859-1';
|
$outputlangs->charset_output = 'ISO-8859-1';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load traductions files required by page
|
// Load translation files required by page
|
||||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
|
||||||
|
|
||||||
|
global $outputlangsbis;
|
||||||
|
$outputlangsbis = null;
|
||||||
|
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
|
||||||
|
$outputlangsbis = new Translate('', $conf);
|
||||||
|
$outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
|
||||||
|
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||||
|
}
|
||||||
|
|
||||||
$nblines = count($object->lines);
|
$nblines = count($object->lines);
|
||||||
|
|
||||||
// Loop on each lines to detect if there is at least one image to show
|
// Loop on each lines to detect if there is at least one image to show
|
||||||
$realpatharray = array();
|
$realpatharray = array();
|
||||||
|
$this->atleastonephoto = false;
|
||||||
if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) {
|
if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) {
|
||||||
$objphoto = new Product($this->db);
|
$objphoto = new Product($this->db);
|
||||||
|
|
||||||
@ -274,6 +285,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$realpath = $dir.$filename;
|
$realpath = $dir.$filename;
|
||||||
$arephoto = true;
|
$arephoto = true;
|
||||||
|
$this->atleastonephoto = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -321,6 +333,10 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
global $action;
|
global $action;
|
||||||
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
|
// Set nblines with the new content of lines after hook
|
||||||
|
$nblines = count($object->lines);
|
||||||
|
//$nbpayments = count($object->getListOfPayments());
|
||||||
|
|
||||||
// Create pdf instance
|
// Create pdf instance
|
||||||
$pdf = pdf_getInstance($this->format);
|
$pdf = pdf_getInstance($this->format);
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
@ -356,7 +372,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||||
|
|
||||||
// Positionne $this->atleastonediscount si on a au moins une remise
|
// Set $this->atleastonediscount if you have at least one discount
|
||||||
for ($i = 0; $i < $nblines; $i++) {
|
for ($i = 0; $i < $nblines; $i++) {
|
||||||
if ($object->lines[$i]->remise_percent) {
|
if ($object->lines[$i]->remise_percent) {
|
||||||
$this->atleastonediscount++;
|
$this->atleastonediscount++;
|
||||||
@ -389,7 +405,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
||||||
|
|
||||||
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis);
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
@ -399,6 +415,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||||
|
|
||||||
// Incoterm
|
// Incoterm
|
||||||
|
$height_incoterms = 0;
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (!empty($conf->incoterm->enabled)) {
|
||||||
$desc_incoterms = $object->getIncotermsForPDF();
|
$desc_incoterms = $object->getIncotermsForPDF();
|
||||||
if ($desc_incoterms) {
|
if ($desc_incoterms) {
|
||||||
@ -414,10 +431,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
|
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
|
||||||
|
|
||||||
$tab_top = $nexY + 6;
|
$tab_top = $nexY + 6;
|
||||||
|
$height_incoterms += 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affiche notes
|
// Displays notes
|
||||||
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
|
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
|
||||||
if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) {
|
if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) {
|
||||||
// Get first sale rep
|
// Get first sale rep
|
||||||
@ -438,14 +456,15 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0) {
|
if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0) {
|
||||||
$tmpuser = new User($this->db);
|
$tmpuser = new User($this->db);
|
||||||
$tmpuser->fetch($object->user_author_id);
|
$tmpuser->fetch($object->user_author_id);
|
||||||
$notetoshow .= $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs);
|
|
||||||
if ($tmpuser->email) {
|
|
||||||
$notetoshow .= ', Mail: '.$tmpuser->email;
|
$creator_info = $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs);
|
||||||
}
|
if ($tmpuser->email) $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email;
|
||||||
if ($tmpuser->office_phone) {
|
if ($tmpuser->office_phone) $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone;
|
||||||
$notetoshow .= ', Tel: '.$tmpuser->office_phone;
|
|
||||||
}
|
$notetoshow = dol_concatdesc($notetoshow, $creator_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($notetoshow) {
|
if ($notetoshow) {
|
||||||
$tab_top -= 2;
|
$tab_top -= 2;
|
||||||
|
|
||||||
|
|||||||
@ -321,7 +321,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
global $action;
|
global $action;
|
||||||
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
// Set nblines with the new facture lines content after hook
|
// Set nblines with the new content of lines after hook
|
||||||
$nblines = count($object->lines);
|
$nblines = count($object->lines);
|
||||||
//$nbpayments = count($object->getListOfPayments());
|
//$nbpayments = count($object->getListOfPayments());
|
||||||
|
|
||||||
@ -816,11 +816,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$pdf->setPage($pageposafter);
|
$pdf->setPage($pageposafter);
|
||||||
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
||||||
//$pdf->SetDrawColor(190,190,200);
|
//$pdf->SetDrawColor(190,190,200);
|
||||||
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
|
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
|
||||||
$pdf->SetLineStyle(array('dash'=>0));
|
$pdf->SetLineStyle(array('dash'=>0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$nexY += 2; // Add space between lines
|
||||||
|
|
||||||
// Detect if some page were added automatically and output _tableau for past pages
|
// Detect if some page were added automatically and output _tableau for past pages
|
||||||
while ($pagenb < $pageposafter) {
|
while ($pagenb < $pageposafter) {
|
||||||
|
|||||||
@ -135,7 +135,8 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
public $status;
|
public $status;
|
||||||
// END MODULEBUILDER PROPERTIES
|
// END MODULEBUILDER PROPERTIES
|
||||||
|
|
||||||
public $pubregister;
|
//public $pubregister;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -252,8 +253,8 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
|
|
||||||
$this->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1);
|
/*$this->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1);
|
||||||
$this->pubregister = $link_subscription;
|
$this->pubregister = $link_subscription;*/
|
||||||
|
|
||||||
$this->getActionCommFields();
|
$this->getActionCommFields();
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@ -31,19 +31,23 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
|
||||||
|
global $dolibarr_main_url_root;
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("eventorganization", "projects"));
|
$langs->loadLangs(array("eventorganization", "projects"));
|
||||||
|
|
||||||
// Get parameters
|
|
||||||
$id = GETPOST('id', 'int');
|
|
||||||
$ref = GETPOST('ref', 'alpha');
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothcard'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothcard'; // To manage different context of search
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
|
$id = GETPOST('id', 'int');
|
||||||
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$withproject = GETPOST('withproject', 'int');
|
$withproject = GETPOST('withproject', 'int');
|
||||||
$mode = GETPOST('mode', 'alpha');
|
$mode = GETPOST('mode', 'alpha');
|
||||||
|
|
||||||
@ -114,7 +118,7 @@ if (empty($reshook)) {
|
|||||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||||
$backtopage = $backurlforlist;
|
$backtopage = $backurlforlist;
|
||||||
} else {
|
} else {
|
||||||
$backtopage = dol_buildpath('/eventorganization/conferenceorbooth_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
|
$backtopage = dol_buildpath('/eventorganization/conferenceorbooth_card.php', 1).'?id='.($id > 0 ? $id : '__ID__').($withproject ? '&withproject=1' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,13 +198,13 @@ if (!empty($withproject)) {
|
|||||||
// Title
|
// Title
|
||||||
$morehtmlref .= $projectstatic->title;
|
$morehtmlref .= $projectstatic->title;
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
if ($projectstatic->thirdparty->id > 0) {
|
if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
|
||||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
||||||
}
|
}
|
||||||
$morehtmlref .= '</div>';
|
$morehtmlref .= '</div>';
|
||||||
|
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (empty($user->rights->projet->all->lire)) {
|
if (empty($user->rights->project->all->lire)) {
|
||||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||||
}
|
}
|
||||||
@ -275,7 +279,10 @@ if (!empty($withproject)) {
|
|||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
$objectconf = $object;
|
||||||
|
$object = $projectstatic;
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
$object = $objectconf;
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -284,17 +291,17 @@ if (!empty($withproject)) {
|
|||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
print '<td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
print nl2br($projectstatic->description);
|
print nl2br($projectstatic->description);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled) {
|
if ($conf->categorie->enabled) {
|
||||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||||
print $form->showCategories($projectstatic->id, 'project', 1);
|
print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,15 +322,15 @@ if (!empty($withproject)) {
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey('PriceOfRegistration', 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval('PriceOfRegistration', 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey('PriceOfBooth', 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval('PriceOfBooth', 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
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 "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||||
@ -332,12 +339,46 @@ if (!empty($withproject)) {
|
|||||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||||
|
|
||||||
// Show message
|
// Show message
|
||||||
$message = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
$message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||||
$message .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...');
|
$message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
|
||||||
$message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').'</a>';
|
$message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
|
||||||
print $message;
|
print $message;
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
// Link to the submit vote/register page
|
||||||
|
print '<tr><td>';
|
||||||
|
//print '<span class="opacitymedium">';
|
||||||
|
print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
|
||||||
|
//print '</span>';
|
||||||
|
print '</td><td>';
|
||||||
|
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $projectstatic->id);
|
||||||
|
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
|
||||||
|
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
|
//print '<div class="urllink">';
|
||||||
|
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.'" class="quatrevingtpercent">'.$linksuggest.'</a></div>';
|
||||||
|
print '<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
|
||||||
|
//print '</div>';
|
||||||
|
//print ajax_autoselect("linkregister");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Link to the subscribe
|
||||||
|
print '<tr><td>';
|
||||||
|
//print '<span class="opacitymedium">';
|
||||||
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
|
//print '</span>';
|
||||||
|
print '</td><td>';
|
||||||
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).'&type=global';
|
||||||
|
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
|
||||||
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
|
//print '<div class="urllink">';
|
||||||
|
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.'" class="quatrevingtpercent">'.$link_subscription.'</a></div>';
|
||||||
|
print '<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
|
||||||
|
//print '</div>';
|
||||||
|
//print ajax_autoselect("linkregister");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -473,7 +514,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
// Object card
|
// Object card
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
http://dolibarr.local/eventorganization/conferenceorbooth_list.php?projectid=7
|
|
||||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1).'?projectid='.$object->fk_project.$withProjectUrl.'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1).'?projectid='.$object->fk_project.$withProjectUrl.'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref = '<div class="refidno">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
@ -491,44 +531,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
//$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
|
//$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
|
||||||
//unset($object->fields['fk_project']); // Hide field already shown in banner
|
//unset($object->fields['fk_project']); // Hide field already shown in banner
|
||||||
//unset($object->fields['fk_soc']); // Hide field already shown in banner
|
//unset($object->fields['fk_soc']); // Hide field already shown in banner
|
||||||
$keyforbreak='pubregister';
|
$keyforbreak='num_vote';
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
|
||||||
$object->fetchObjectLinked();
|
|
||||||
|
|
||||||
|
|
||||||
if (is_array($object->linkedObjects) && count($object->linkedObjects)>0 && array_key_exists("facture", $object->linkedObjects)) {
|
|
||||||
foreach ($object->linkedObjects["facture"] as $fac) {
|
|
||||||
/**
|
|
||||||
* @var $fac Facture
|
|
||||||
*/
|
|
||||||
if (empty($fac->paye)) {
|
|
||||||
$key = 'paymentlink_'.$fac->id;
|
|
||||||
print '<tr class="field_'.$key.'"><td';
|
|
||||||
print ' class="titlefield fieldname_'.$key;
|
|
||||||
print '">';
|
|
||||||
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')) . ' '. $fac->ref.'</span><br>';
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '<td class="valuefield fieldname_'.$key;
|
|
||||||
print '">';
|
|
||||||
$sourcetouse = 'boothlocation';
|
|
||||||
$reftouse = $fac->id;
|
|
||||||
$redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.$sourcetouse.'&ref='.$reftouse.'&booth='.$object->id;
|
|
||||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
|
||||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
|
||||||
$redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical
|
|
||||||
} else {
|
|
||||||
$redirection .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print '<div class="urllink"><input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$redirection.'">';
|
|
||||||
print '<a href="'.$redirection.'" target="_blank" rel="noopener noreferrer">'.img_picto('', 'globe', 'class="paddingleft"').'</a></div>';
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//var_dump($object);
|
//var_dump($object);
|
||||||
// Other attributes. Fields from hook formObjectOptions and Extrafields.
|
// Other attributes. Fields from hook formObjectOptions and Extrafields.
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
@ -592,9 +598,29 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show links to link elements
|
// Show links to link elements
|
||||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('conferenceorbooth'));
|
//$linktoelem = $form->showLinkToObjectBlock($object, null, array('conferenceorbooth'));
|
||||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
//$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||||
|
|
||||||
|
$object->fetchObjectLinked();
|
||||||
|
|
||||||
|
if (is_array($object->linkedObjects) && count($object->linkedObjects)>0 && array_key_exists("facture", $object->linkedObjects)) {
|
||||||
|
foreach ($object->linkedObjects["facture"] as $fac) {
|
||||||
|
if (empty($fac->paye)) {
|
||||||
|
$key = 'paymentlink_'.$fac->id;
|
||||||
|
|
||||||
|
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')) . ' '. $fac->ref.'</span><br>';
|
||||||
|
|
||||||
|
$sourcetouse = 'boothlocation';
|
||||||
|
$reftouse = $fac->id;
|
||||||
|
|
||||||
|
$url = getOnlinePaymentUrl(0, $sourcetouse, $reftouse);
|
||||||
|
$url .= '&booth='.$object->id;
|
||||||
|
|
||||||
|
print '<div class="urllink"><input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">';
|
||||||
|
print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.img_picto('', 'globe', 'class="paddingleft"').'</a></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</div><div class="fichehalfright">';
|
print '</div><div class="fichehalfright">';
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
|
|||||||
@ -17,41 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file conferenceorbooth_contact.php
|
* \file htdocs/eventorganization/conferenceorbooth_contact.php
|
||||||
* \ingroup eventorganization
|
* \ingroup eventorganization
|
||||||
* \brief Tab for contacts linked to ConferenceOrBooth
|
* \brief Tab for contacts linked to ConferenceOrBooth
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
require '../main.inc.php';
|
||||||
$res = 0;
|
|
||||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
|
||||||
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
|
|
||||||
$res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
|
|
||||||
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
|
|
||||||
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
|
|
||||||
$i--; $j--;
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {
|
|
||||||
$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {
|
|
||||||
$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php using relative path
|
|
||||||
if (!$res && file_exists("../main.inc.php")) {
|
|
||||||
$res = @include "../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && file_exists("../../main.inc.php")) {
|
|
||||||
$res = @include "../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && file_exists("../../../main.inc.php")) {
|
|
||||||
$res = @include "../../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res) {
|
|
||||||
die("Include of main fails");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
@ -59,14 +30,25 @@ require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||||
// Load translation files required by the page
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
||||||
$langs->loadLangs(array("eventorganization@eventorganization", "companies", "other", "mails"));
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
|
||||||
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("eventorganization", "projects", "companies", "other", "mails"));
|
||||||
|
|
||||||
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$lineid = GETPOST('lineid', 'int');
|
$lineid = GETPOST('lineid', 'int');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
|
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothcard'; // To manage different context of search
|
||||||
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||||
|
|
||||||
$withproject = GETPOST('withproject', 'int');
|
$withproject = GETPOST('withproject', 'int');
|
||||||
|
|
||||||
// Initialize technical objects
|
// Initialize technical objects
|
||||||
@ -78,8 +60,10 @@ $hookmanager->initHooks(array('conferenceorboothcontact', 'globalcard')); // Not
|
|||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
|
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
@ -88,13 +72,35 @@ if ($user->socid > 0) {
|
|||||||
$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||||
|
|
||||||
$permission = $user->rights->eventorganization->write;
|
$permissiontoread = $user->rights->eventorganization->read;
|
||||||
|
$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
|
$permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||||
|
$permissionnote = $user->rights->eventorganization->write; // Used by the include of actions_setnotes.inc.php
|
||||||
|
$permissiondellink = $user->rights->eventorganization->write; // Used by the include of actions_dellink.inc.php
|
||||||
|
$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if ($user->socid > 0) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
|
$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
if (!$permissiontoread) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'addcontact' && $permission) { // Add a new contact
|
if ($action == 'addcontact' && $permission) { // Add a new contact
|
||||||
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||||
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
|
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
|
||||||
@ -131,16 +137,16 @@ if ($action == 'addcontact' && $permission) { // Add a new contact
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$title = $langs->trans('ConferenceOrBooth')." - ".$langs->trans('ContactsAddresses');
|
|
||||||
$help_url = '';
|
|
||||||
//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
|
||||||
llxHeader('', $title, $help_url);
|
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
$contactstatic = new Contact($db);
|
$contactstatic = new Contact($db);
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
|
|
||||||
|
$title = $langs->trans('ConferenceOrBooth')." - ".$langs->trans('ContactsAddresses');
|
||||||
|
$help_url = '';
|
||||||
|
//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||||
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
|
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
@ -175,13 +181,13 @@ if (!empty($withproject)) {
|
|||||||
// Title
|
// Title
|
||||||
$morehtmlref .= $projectstatic->title;
|
$morehtmlref .= $projectstatic->title;
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
if ($projectstatic->thirdparty->id > 0) {
|
if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
|
||||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
||||||
}
|
}
|
||||||
$morehtmlref .= '</div>';
|
$morehtmlref .= '</div>';
|
||||||
|
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (empty($user->rights->projet->all->lire)) {
|
if (empty($user->rights->project->all->lire)) {
|
||||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||||
}
|
}
|
||||||
@ -256,7 +262,10 @@ if (!empty($withproject)) {
|
|||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
$objectconf = $object;
|
||||||
|
$object = $projectstatic;
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
$object = $objectconf;
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -265,17 +274,17 @@ if (!empty($withproject)) {
|
|||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
print '<td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
print nl2br($projectstatic->description);
|
print nl2br($projectstatic->description);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled) {
|
if ($conf->categorie->enabled) {
|
||||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||||
print $form->showCategories($projectstatic->id, 'project', 1);
|
print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,15 +305,15 @@ if (!empty($withproject)) {
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey('PriceOfRegistration', 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval('PriceOfRegistration', 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey('PriceOfBooth', 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval('PriceOfBooth', 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
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 "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||||
@ -313,12 +322,46 @@ if (!empty($withproject)) {
|
|||||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||||
|
|
||||||
// Show message
|
// Show message
|
||||||
$message = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
$message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||||
$message .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...');
|
$message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
|
||||||
$message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').'</a>';
|
$message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
|
||||||
print $message;
|
print $message;
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
// Link to the submit vote/register page
|
||||||
|
print '<tr><td>';
|
||||||
|
//print '<span class="opacitymedium">';
|
||||||
|
print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
|
||||||
|
//print '</span>';
|
||||||
|
print '</td><td>';
|
||||||
|
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $projectstatic->id);
|
||||||
|
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
|
||||||
|
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
|
//print '<div class="urllink">';
|
||||||
|
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.'" class="quatrevingtpercent">'.$linksuggest.'</a></div>';
|
||||||
|
print '<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
|
||||||
|
//print '</div>';
|
||||||
|
//print ajax_autoselect("linkregister");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Link to the subscribe
|
||||||
|
print '<tr><td>';
|
||||||
|
//print '<span class="opacitymedium">';
|
||||||
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
|
//print '</span>';
|
||||||
|
print '</td><td>';
|
||||||
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).'&type=global';
|
||||||
|
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
|
||||||
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
|
//print '<div class="urllink">';
|
||||||
|
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.'" class="quatrevingtpercent">'.$link_subscription.'</a></div>';
|
||||||
|
print '<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
|
||||||
|
//print '</div>';
|
||||||
|
//print ajax_autoselect("linkregister");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -32,13 +32,19 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("eventorganization", "companies", "other", "mails"));
|
$langs->loadLangs(array("eventorganization", "projects", "companies", "other", "mails"));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'));
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
|
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothcard'; // To manage different context of search
|
||||||
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||||
|
|
||||||
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$withproject = GETPOST('withproject', 'int');
|
$withproject = GETPOST('withproject', 'int');
|
||||||
$project_ref = GETPOST('project_ref', 'alpha');
|
$project_ref = GETPOST('project_ref', 'alpha');
|
||||||
@ -69,17 +75,25 @@ $extrafields = new ExtraFields($db);
|
|||||||
$projectstatic = new Project($db);
|
$projectstatic = new Project($db);
|
||||||
$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('conferenceorboothdocument', 'globalcard')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array('conferenceorboothdocument', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
|
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
$upload_dir = $conf->eventorganization->multidir_output[$object->entity ? $object->entity : $conf->entity]."/conferenceorbooth/".get_exdir(0, 0, 0, 1, $object);
|
$upload_dir = $conf->eventorganization->multidir_output[$object->entity ? $object->entity : $conf->entity]."/conferenceorbooth/".get_exdir(0, 0, 0, 1, $object);
|
||||||
}
|
}
|
||||||
|
|
||||||
$permissiontoadd = $user->rights->eventorganization->conferenceorbooth->write; // Used by the include of actions_addupdatedelete.inc.php
|
$permissiontoread = $user->rights->eventorganization->read;
|
||||||
|
$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
|
$permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
|
||||||
|
$permissionnote = $user->rights->eventorganization->write; // Used by the include of actions_setnotes.inc.php
|
||||||
|
$permissiondellink = $user->rights->eventorganization->write; // Used by the include of actions_dellink.inc.php
|
||||||
|
$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
@ -88,11 +102,21 @@ if ($user->socid > 0) {
|
|||||||
$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
$result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
if (!$permissiontoread) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +128,6 @@ $form = new Form($db);
|
|||||||
|
|
||||||
$title = $langs->trans("ConferenceOrBooth").' - '.$langs->trans("Files");
|
$title = $langs->trans("ConferenceOrBooth").' - '.$langs->trans("Files");
|
||||||
$help_url = '';
|
$help_url = '';
|
||||||
//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
|
||||||
llxHeader('', $title, $help_url);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
$result = $projectstatic->fetch($object->fk_project);
|
$result = $projectstatic->fetch($object->fk_project);
|
||||||
@ -121,6 +144,7 @@ $object->project = clone $projectstatic;
|
|||||||
if (!empty($withproject)) {
|
if (!empty($withproject)) {
|
||||||
// Tabs for project
|
// Tabs for project
|
||||||
$tab = 'eventorganisation';
|
$tab = 'eventorganisation';
|
||||||
|
$withProjectUrl = "&withproject=1";
|
||||||
$head = project_prepare_head($projectstatic);
|
$head = project_prepare_head($projectstatic);
|
||||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
||||||
|
|
||||||
@ -132,13 +156,13 @@ if (!empty($withproject)) {
|
|||||||
// Title
|
// Title
|
||||||
$morehtmlref .= $projectstatic->title;
|
$morehtmlref .= $projectstatic->title;
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
if ($projectstatic->thirdparty->id > 0) {
|
if (isset($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
|
||||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
||||||
}
|
}
|
||||||
$morehtmlref .= '</div>';
|
$morehtmlref .= '</div>';
|
||||||
|
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (empty($user->rights->projet->all->lire)) {
|
if (empty($user->rights->project->all->lire)) {
|
||||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||||
}
|
}
|
||||||
@ -213,7 +237,10 @@ if (!empty($withproject)) {
|
|||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
$objectconf = $object;
|
||||||
|
$object = $projectstatic;
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
$object = $objectconf;
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -222,17 +249,17 @@ if (!empty($withproject)) {
|
|||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
print '<td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
print nl2br($projectstatic->description);
|
print nl2br($projectstatic->description);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled) {
|
if ($conf->categorie->enabled) {
|
||||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||||
print $form->showCategories($projectstatic->id, 'project', 1);
|
print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,15 +280,15 @@ if (!empty($withproject)) {
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey('PriceOfRegistration', 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval('PriceOfRegistration', 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey('PriceOfBooth', 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval('PriceOfBooth', 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid');
|
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 "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||||
@ -270,12 +297,46 @@ if (!empty($withproject)) {
|
|||||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
|
||||||
|
|
||||||
// Show message
|
// Show message
|
||||||
$message = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
$message = '<a target="_blank" rel="noopener noreferrer" href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
|
||||||
$message .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...');
|
$message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...'));
|
||||||
$message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').'</a>';
|
$message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').'</a>';
|
||||||
print $message;
|
print $message;
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
// Link to the submit vote/register page
|
||||||
|
print '<tr><td>';
|
||||||
|
//print '<span class="opacitymedium">';
|
||||||
|
print $form->textwithpicto($langs->trans("SuggestOrVoteForConfOrBooth"), $langs->trans("EvntOrgRegistrationHelpMessage"));
|
||||||
|
//print '</span>';
|
||||||
|
print '</td><td>';
|
||||||
|
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $projectstatic->id);
|
||||||
|
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
|
||||||
|
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
|
//print '<div class="urllink">';
|
||||||
|
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$linksuggest.'" class="quatrevingtpercent">'.$linksuggest.'</a></div>';
|
||||||
|
print '<a target="_blank" rel="noopener noreferrer" href="'.$linksuggest.'">'.img_picto('', 'globe').'</a>';
|
||||||
|
//print '</div>';
|
||||||
|
//print ajax_autoselect("linkregister");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Link to the subscribe
|
||||||
|
print '<tr><td>';
|
||||||
|
//print '<span class="opacitymedium">';
|
||||||
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
|
//print '</span>';
|
||||||
|
print '</td><td>';
|
||||||
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.((int) $projectstatic->id).'&type=global';
|
||||||
|
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $projectstatic->id), 'md5');
|
||||||
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
|
//print '<div class="urllink">';
|
||||||
|
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
print '<div class="tdoverflowmax200 inline-block valignmiddle"><a target="_blank" href="'.$link_subscription.'" class="quatrevingtpercent">'.$link_subscription.'</a></div>';
|
||||||
|
print '<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" href="'.$link_subscription.'">'.img_picto('', 'globe').'</a>';
|
||||||
|
//print '</div>';
|
||||||
|
//print ajax_autoselect("linkregister");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -305,7 +366,6 @@ if ($object->id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Object card
|
// Object card
|
||||||
// -------------
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
|||||||
@ -31,9 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
|
||||||
if ($conf->categorie->enabled) {
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
|
|
||||||
@ -231,9 +229,9 @@ if (empty($reshook)) {
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
|
$title = $langs->trans('ListOfConferencesOrBooths');
|
||||||
//$help_url="EN:Module_ConferenceOrBooth|FR:Module_ConferenceOrBooth_FR|ES:Módulo_ConferenceOrBooth";
|
//$help_url="EN:Module_ConferenceOrBooth|FR:Module_ConferenceOrBooth_FR|ES:Módulo_ConferenceOrBooth";
|
||||||
$help_url = '';
|
$help_url = '';
|
||||||
$title = $langs->trans('ListOfConferencesOrBooths');
|
|
||||||
|
|
||||||
if ($projectid > 0 || $projectref) {
|
if ($projectid > 0 || $projectref) {
|
||||||
$project = new Project($db);
|
$project = new Project($db);
|
||||||
@ -302,34 +300,36 @@ if ($projectid > 0) {
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
print '<tr><td class="tdtop">';
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
|
||||||
print $langs->trans("Usage");
|
print '<tr><td class="tdtop">';
|
||||||
print '</td>';
|
print $langs->trans("Usage");
|
||||||
print '<td>';
|
print '</td>';
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
print '<td>';
|
||||||
print '<input type="checkbox" disabled name="usage_opportunity"'.($project->usage_opportunity ? ' checked="checked"' : '').'"> ';
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
print '<input type="checkbox" disabled name="usage_opportunity"'.($project->usage_opportunity ? ' checked="checked"' : '').'"> ';
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||||
print '<br>';
|
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
||||||
|
print '<input type="checkbox" disabled name="usage_task"'.($project->usage_task ? ' checked="checked"' : '').'"> ';
|
||||||
|
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||||
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
|
||||||
|
print '<input type="checkbox" disabled name="usage_bill_time"'.($project->usage_bill_time ? ' checked="checked"' : '').'"> ';
|
||||||
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
|
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
if (!empty($conf->eventorganization->enabled)) {
|
||||||
|
print '<input type="checkbox" disabled name="usage_organize_event"'.($project->usage_organize_event ? ' checked="checked"' : '').'"> ';
|
||||||
|
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||||
|
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
|
||||||
print '<input type="checkbox" disabled name="usage_task"'.($project->usage_task ? ' checked="checked"' : '').'"> ';
|
|
||||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
|
||||||
print '<br>';
|
|
||||||
}
|
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
|
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.($project->usage_bill_time ? ' checked="checked"' : '').'"> ';
|
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
|
||||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
|
||||||
print '<br>';
|
|
||||||
}
|
|
||||||
if (!empty($conf->eventorganization->enabled)) {
|
|
||||||
print '<input type="checkbox" disabled name="usage_organize_event"'.($project->usage_organize_event ? ' checked="checked"' : '').'"> ';
|
|
||||||
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
|
||||||
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
@ -381,7 +381,7 @@ if ($projectid > 0) {
|
|||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled) {
|
if ($conf->categorie->enabled) {
|
||||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||||
print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
|
print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -519,7 +519,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$moreparam .= '&fk_project='.((int) $fk_project);
|
$moreparam .= '&fk_project='.((int) $fk_project);
|
||||||
}
|
}
|
||||||
|
|
||||||
$head = conferenceorboothattendeePrepareHead($object);
|
$head = conferenceorboothAttendeePrepareHead($object);
|
||||||
print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
|
print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
|
||||||
|
|
||||||
$formconfirm = '';
|
$formconfirm = '';
|
||||||
|
|||||||
@ -136,7 +136,7 @@ llxHeader('', $langs->trans('ConferenceOrBoothAttendee'), $help_url);
|
|||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$head = conferenceorboothattendeePrepareHead($object);
|
$head = conferenceorboothAttendeePrepareHead($object);
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'note', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
|
print dol_get_fiche_head($head, 'note', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
|
||||||
|
|
||||||
|
|||||||
@ -47,11 +47,14 @@ function conferenceorboothPrepareHead($object, $with_project = 0)
|
|||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
/*
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
|
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
|
||||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||||
$head[$h][2] = 'contact';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?conforboothid='.$object->id.$withProjectUrl;
|
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?conforboothid='.$object->id.$withProjectUrl;
|
||||||
$head[$h][1] = $langs->trans("Attendees");
|
$head[$h][1] = $langs->trans("Attendees");
|
||||||
$head[$h][2] = 'attendees';
|
$head[$h][2] = 'attendees';
|
||||||
@ -77,6 +80,7 @@ function conferenceorboothPrepareHead($object, $with_project = 0)
|
|||||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbAttendees.'</span>';
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbAttendees.'</span>';
|
||||||
}
|
}
|
||||||
$h++;
|
$h++;
|
||||||
|
*/
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||||
@ -188,7 +192,7 @@ function conferenceorboothProjectPrepareHead($object)
|
|||||||
* @param ConferenceOrBoothAttendee $object ConferenceOrBoothAttendee
|
* @param ConferenceOrBoothAttendee $object ConferenceOrBoothAttendee
|
||||||
* @return array Array of tabs
|
* @return array Array of tabs
|
||||||
*/
|
*/
|
||||||
function conferenceorboothattendeePrepareHead($object)
|
function conferenceorboothAttendeePrepareHead($object)
|
||||||
{
|
{
|
||||||
global $db, $langs, $conf;
|
global $db, $langs, $conf;
|
||||||
|
|
||||||
|
|||||||
@ -2069,13 +2069,14 @@ EmailCollectorConfirmCollect=Do you want to run the collection for this collecto
|
|||||||
NoNewEmailToProcess=No new email (matching filters) to process
|
NoNewEmailToProcess=No new email (matching filters) to process
|
||||||
NothingProcessed=Nothing done
|
NothingProcessed=Nothing done
|
||||||
XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done)
|
XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done)
|
||||||
RecordEvent=Record email event
|
RecordEvent=Record an event in agenda (with type Email sent or received)
|
||||||
CreateLeadAndThirdParty=Create lead (and third party if necessary)
|
CreateLeadAndThirdParty=Create a lead (and a third party if necessary)
|
||||||
CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation)
|
CreateTicketAndThirdParty=Create a ticket (linked to a third party if the third party was loaded by a previous operation, with no third party otherwise)
|
||||||
CodeLastResult=Latest result code
|
CodeLastResult=Latest result code
|
||||||
NbOfEmailsInInbox=Number of emails in source directory
|
NbOfEmailsInInbox=Number of emails in source directory
|
||||||
LoadThirdPartyFromName=Load third party searching on %s (load only)
|
LoadThirdPartyFromName=Load third party searching on %s (load only)
|
||||||
LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found)
|
LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found)
|
||||||
|
AttachJoinedDocumentsToObject=Save attached files into object documents if a ref of an object is found into email topic.
|
||||||
WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr
|
WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr
|
||||||
WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr
|
WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr
|
||||||
WithDolTrackingIDInMsgId=Message sent from Dolibarr
|
WithDolTrackingIDInMsgId=Message sent from Dolibarr
|
||||||
@ -2084,7 +2085,7 @@ CreateCandidature=Create job application
|
|||||||
FormatZip=Zip
|
FormatZip=Zip
|
||||||
MainMenuCode=Menu entry code (mainmenu)
|
MainMenuCode=Menu entry code (mainmenu)
|
||||||
ECMAutoTree=Show automatic ECM tree
|
ECMAutoTree=Show automatic ECM tree
|
||||||
OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\s*([^\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)<br><br>Use a ; char as separator to extract or set several properties.
|
OperationParamDesc=Define the rules to use to extract or set values.<br>Example for operations that need to extract a name from email subject:<br>name=EXTRACT:SUBJECT:Message from company ([^\n]*)<br>Example for operations that create objects:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value including value of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\s*([^\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)<br><br>Use a ; char as separator to extract or set several properties.
|
||||||
OpeningHours=Opening hours
|
OpeningHours=Opening hours
|
||||||
OpeningHoursDesc=Enter here the regular opening hours of your company.
|
OpeningHoursDesc=Enter here the regular opening hours of your company.
|
||||||
ResourceSetup=Configuration of Resource module
|
ResourceSetup=Configuration of Resource module
|
||||||
@ -2130,7 +2131,7 @@ LargerThan=Larger than
|
|||||||
IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into email, or if the email is an answer of an email aready collected and linked to an object, the created event will be automatically linked to the known related object.
|
IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into email, or if the email is an answer of an email aready collected and linked to an object, the created event will be automatically linked to the known related object.
|
||||||
WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/.
|
WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/.
|
||||||
EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account.
|
EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account.
|
||||||
EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it.<br>For example, if you want to create a thirdparty with a name extracted a string 'Name: name to find' found into the body, use sender email as email, you can set the parameter field like this:<br>'email=HEADER:^From:(.*);name=EXTRACT:BODY:Name:\s([^\s]*);client=SET:2;'<br>
|
EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it.<br>For example, if you want to create a thirdparty with a name extracted from a string 'Name: name to find' present into the body, use the sender email as email, you can set the parameter field like this:<br>'email=HEADER:^From:(.*);name=EXTRACT:BODY:Name:\s([^\s]*);client=SET:2;'<br>
|
||||||
EndPointFor=End point for %s : %s
|
EndPointFor=End point for %s : %s
|
||||||
DeleteEmailCollector=Delete email collector
|
DeleteEmailCollector=Delete email collector
|
||||||
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
|
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
|
||||||
|
|||||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
|||||||
$servicename = 'PayBox';
|
$servicename = 'PayBox';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('admin', 'other', 'paybox', 'paypal'));
|
$langs->loadLangs(array('admin', 'other', 'paybox', 'paypal', 'stripe'));
|
||||||
|
|
||||||
if (!$user->admin) {
|
if (!$user->admin) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -261,7 +261,7 @@ $doleditor->Create();
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td class="fieldrequired">';
|
||||||
print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>';
|
print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>';
|
||||||
print '<input size="32" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
print '<input size="32" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
|
print ' <span class="opacitymedium">'.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
|
||||||
|
|||||||
@ -4800,9 +4800,10 @@ class Product extends CommonObject
|
|||||||
if (!empty($this->entity)) {
|
if (!empty($this->entity)) {
|
||||||
$tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80);
|
$tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80);
|
||||||
if ($this->nbphoto > 0) {
|
if ($this->nbphoto > 0) {
|
||||||
$label .= '<div class="photointooltip">';
|
$label .= '<div class="photointooltip floatright">';
|
||||||
$label .= $tmpphoto;
|
$label .= $tmpphoto;
|
||||||
$label .= '</div><div style="clear: both;"></div>';
|
$label .= '</div>';
|
||||||
|
//$label .= '<div style="clear: both;"></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -735,9 +735,9 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
if ($object->multiprices_base_type[$soc->price_level] == 'TTC') {
|
if ($object->multiprices_base_type[$soc->price_level] == 'TTC') {
|
||||||
print price($object->multiprices_ttc[$soc->price_level]);
|
print '<span class="amount">'.price($object->multiprices_ttc[$soc->price_level]).'</span>';
|
||||||
} else {
|
} else {
|
||||||
print price($object->multiprices[$soc->price_level]);
|
print '<span class="amount">'.price($object->multiprices[$soc->price_level]).'</span>';
|
||||||
}
|
}
|
||||||
if ($object->multiprices_base_type[$soc->price_level]) {
|
if ($object->multiprices_base_type[$soc->price_level]) {
|
||||||
print ' '.$langs->trans($object->multiprices_base_type[$soc->price_level]);
|
print ' '.$langs->trans($object->multiprices_base_type[$soc->price_level]);
|
||||||
@ -892,15 +892,15 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($object->multiprices_base_type [$i] == 'TTC') {
|
if ($object->multiprices_base_type [$i] == 'TTC') {
|
||||||
print '<td style="text-align: right">'.price($object->multiprices_ttc[$i]);
|
print '<td class="right"><span class="amount">'.price($object->multiprices_ttc[$i]);
|
||||||
} else {
|
} else {
|
||||||
print '<td style="text-align: right">'.price($object->multiprices[$i]);
|
print '<td class="right"><span class="amount">'.price($object->multiprices[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->multiprices_base_type[$i]) {
|
if ($object->multiprices_base_type[$i]) {
|
||||||
print ' '.$langs->trans($object->multiprices_base_type [$i]).'</td>';
|
print ' '.$langs->trans($object->multiprices_base_type [$i]).'</span></td>';
|
||||||
} else {
|
} else {
|
||||||
print ' '.$langs->trans($object->price_base_type).'</td>';
|
print ' '.$langs->trans($object->price_base_type).'</span></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prix min
|
// Prix min
|
||||||
|
|||||||
@ -475,6 +475,8 @@ print $hookmanager->resPrint;
|
|||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
$totalbuyingprice = 0;
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
@ -567,6 +569,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
} else {
|
} else {
|
||||||
print '';
|
print '';
|
||||||
}
|
}
|
||||||
|
$totalbuyingprice += $objp->estimatedvalue;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Selling value
|
// Selling value
|
||||||
@ -598,7 +601,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -607,11 +610,15 @@ $parameters = array('sql'=>$sql);
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
|
$colspan = 8;
|
||||||
|
if ($mode == 'future') {
|
||||||
|
$colspan++;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr class="liste_total"><td>'.$langs->trans("Totalforthispage").'</td>';
|
||||||
|
print '<td></td><td></td><td class="right">'.price(price2num($totalbuyingprice, 'MT')).'</td><td></td><td></td><td></td><td></td></tr>';
|
||||||
|
|
||||||
if (empty($date) || !$dateIsValid) {
|
if (empty($date) || !$dateIsValid) {
|
||||||
$colspan = 8;
|
|
||||||
if ($mode == 'future') {
|
|
||||||
$colspan++;
|
|
||||||
}
|
|
||||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("EnterADateCriteria").'</span></td></tr>';
|
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("EnterADateCriteria").'</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,12 +48,13 @@ if (is_numeric($entity)) {
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
|
|
||||||
// Load translation files
|
// Load translation files
|
||||||
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox","propal"));
|
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "members", "paybox", "propal"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
// No check on module enabled. Done later according to $validpaymentmethod
|
// No check on module enabled. Done later according to $validpaymentmethod
|
||||||
@ -61,6 +62,7 @@ $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors",
|
|||||||
// Get parameters
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
|
|
||||||
$refusepropal = GETPOST('refusepropal', 'alpha');
|
$refusepropal = GETPOST('refusepropal', 'alpha');
|
||||||
$message = GETPOST('message', 'aZ09');
|
$message = GETPOST('message', 'aZ09');
|
||||||
|
|
||||||
@ -119,15 +121,23 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last &
|
|||||||
|
|
||||||
$creditor = $mysoc->name;
|
$creditor = $mysoc->name;
|
||||||
|
|
||||||
$object = new Propal($db);
|
$type = $source;
|
||||||
$object->fetch(0, $ref);
|
if ($source == 'proposal') {
|
||||||
|
$object = new Propal($db);
|
||||||
|
$object->fetch(0, $ref);
|
||||||
|
} else {
|
||||||
|
accessforbidden('Bad value for source');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check securitykey
|
// Check securitykey
|
||||||
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
$securekeyseed = '';
|
||||||
$type = $source;
|
if ($source == 'proposal') {
|
||||||
$calculatedsecuritykey = dol_hash($securekeyseed.$type.$ref, '0');
|
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
||||||
|
}
|
||||||
|
|
||||||
if ($calculatedsecuritykey != $SECUREKEY) {
|
if (!dol_verifyHash($securekeyseed.$type.$ref, $SECUREKEY, '0')) {
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
@ -184,8 +194,8 @@ if ($action == 'refusepropal') {
|
|||||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
|
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check link validity for param 'source'
|
// Check link validity for param 'source' to avoid use of the examples as value
|
||||||
if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', ''))) {
|
if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', 'proposal_ref', ''))) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
dol_print_error_email('BADREFINONLINESIGNFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref));
|
dol_print_error_email('BADREFINONLINESIGNFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref));
|
||||||
// End of page
|
// End of page
|
||||||
@ -241,16 +251,15 @@ if ($urllogo) {
|
|||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN)) {
|
if ($source == 'proposal' && !empty($conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN)) {
|
||||||
print '<div class="backimagepublicproposalsign">';
|
print '<div class="backimagepublicproposalsign">';
|
||||||
print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN.'">';
|
print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN.'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output introduction text
|
// Output introduction text
|
||||||
$text = '';
|
$text = '';
|
||||||
if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) {
|
if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) {
|
||||||
$langs->load("members");
|
|
||||||
$reg = array();
|
$reg = array();
|
||||||
if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) {
|
if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) {
|
||||||
$text .= $langs->trans($reg[1])."<br>\n";
|
$text .= $langs->trans($reg[1])."<br>\n";
|
||||||
@ -326,9 +335,22 @@ if ($source == 'proposal') {
|
|||||||
print $langs->trans("DownloadDocument").'</a>';
|
print $langs->trans("DownloadDocument").'</a>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* TODO If the file of proposal signed is newer than the default proposal file, get link of proposal signed
|
$last_main_doc_file = $proposal->last_main_doc;
|
||||||
|
if (preg_match('/_signed-(\d+)/', $last_main_doc_file)) { // If the last main doc has been signed
|
||||||
|
$last_main_doc_file_not_signed = preg_replace('/_signed-(\d+)/', '', $last_main_doc_file);
|
||||||
|
|
||||||
*/
|
$datefilesigned = dol_filemtime($last_main_doc_file);
|
||||||
|
$datefilenotsigned = dol_filemtime($last_main_doc_file_not_signed);
|
||||||
|
|
||||||
|
if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
|
||||||
|
$directdownloadlink = $proposal->getLastMainDocLink('proposal');
|
||||||
|
if ($directdownloadlink) {
|
||||||
|
print '<br><a href="'.$directdownloadlink.'">';
|
||||||
|
print img_mime($proposal->last_main_doc, '');
|
||||||
|
print $langs->trans("DownloadDocument").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<input type="hidden" name="source" value="'.GETPOST("source", 'alpha').'">';
|
print '<input type="hidden" name="source" value="'.GETPOST("source", 'alpha').'">';
|
||||||
@ -364,12 +386,13 @@ if ($action != 'dosign') {
|
|||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
print '<tr><td class="center">';
|
print '<tr><td class="center">';
|
||||||
|
|
||||||
|
|
||||||
if ($action == "dosign" && empty($cancel)) {
|
if ($action == "dosign" && empty($cancel)) {
|
||||||
print '<div class="tablepublicpayment">';
|
print '<div class="tablepublicpayment">';
|
||||||
print '<input type="button" class="buttonDelete small" id="clearsignature" value="'.$langs->trans("ClearSignature").'">';
|
print '<input type="button" class="buttonDelete small" id="clearsignature" value="'.$langs->trans("ClearSignature").'">';
|
||||||
print '<div id="signature" style="border:solid;"></div>';
|
print '<div id="signature" style="border:solid;"></div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<input type="button" class="button" id="signpropal" value="'.$langs->trans("Sign").'">';
|
print '<input type="button" class="button" id="signbutton" value="'.$langs->trans("Sign").'">';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
|
|
||||||
// Add js code managed into the div #signature
|
// Add js code managed into the div #signature
|
||||||
@ -380,9 +403,9 @@ if ($action == "dosign" && empty($cancel)) {
|
|||||||
|
|
||||||
$("#signature").on("change",function(){
|
$("#signature").on("change",function(){
|
||||||
$("#clearsignature").css("display","");
|
$("#clearsignature").css("display","");
|
||||||
$("#signpropal").attr("disabled",false);
|
$("#signbutton").attr("disabled",false);
|
||||||
if(!$._data($("#signpropal")[0], "events")){
|
if(!$._data($("#signbutton")[0], "events")){
|
||||||
$("#signpropal").on("click",function(){
|
$("#signbutton").on("click",function(){
|
||||||
var signature = $("#signature").jSignature("getData", "image");
|
var signature = $("#signature").jSignature("getData", "image");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -410,32 +433,34 @@ if ($action == "dosign" && empty($cancel)) {
|
|||||||
|
|
||||||
$("#clearsignature").on("click",function(){
|
$("#clearsignature").on("click",function(){
|
||||||
$("#signature").jSignature("clear");
|
$("#signature").jSignature("clear");
|
||||||
$("#signpropal").attr("disabled",true);
|
$("#signbutton").attr("disabled",true);
|
||||||
/* $("#clearsignature").css("display","none"); */
|
/* $("#clearsignature").css("display","none"); */
|
||||||
});
|
});
|
||||||
|
|
||||||
/* $("#clearsignature").css("display","none"); */
|
/* $("#clearsignature").css("display","none"); */
|
||||||
$("#signpropal").attr("disabled",true);
|
$("#signbutton").attr("disabled",true);
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
} else {
|
} else {
|
||||||
if ($object->status == $object::STATUS_SIGNED) {
|
if ($source == 'proposal') {
|
||||||
print '<br>';
|
if ($object->status == $object::STATUS_SIGNED) {
|
||||||
if ($message == 'signed') {
|
print '<br>';
|
||||||
print '<span class="ok">'.$langs->trans("PropalSigned").'</span>';
|
if ($message == 'signed') {
|
||||||
|
print '<span class="ok">'.$langs->trans("PropalSigned").'</span>';
|
||||||
|
} else {
|
||||||
|
print '<span class="ok">'.$langs->trans("PropalAlreadySigned").'</span>';
|
||||||
|
}
|
||||||
|
} elseif ($object->status == $object::STATUS_NOTSIGNED) {
|
||||||
|
print '<br>';
|
||||||
|
if ($message == 'refused') {
|
||||||
|
print '<span class="ok">'.$langs->trans("PropalRefused").'</span>';
|
||||||
|
} else {
|
||||||
|
print '<span class="warning">'.$langs->trans("PropalAlreadyRefused").'</span>';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<span class="ok">'.$langs->trans("PropalAlreadySigned").'</span>';
|
print '<input type="submit" class="butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans("SignPropal").'">';
|
||||||
|
print '<input name="refusepropal" type="submit" class="butActionDelete small wraponsmartphone marginbottomonly marginleftonly marginrightonly" value="'.$langs->trans("RefusePropal").'">';
|
||||||
}
|
}
|
||||||
} elseif ($object->status == $object::STATUS_NOTSIGNED) {
|
|
||||||
print '<br>';
|
|
||||||
if ($message == 'refused') {
|
|
||||||
print '<span class="ok">'.$langs->trans("PropalRefused").'</span>';
|
|
||||||
} else {
|
|
||||||
print '<span class="warning">'.$langs->trans("PropalAlreadyRefused").'</span>';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
print '<input type="submit" class="butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans("SignPropal").'">';
|
|
||||||
print '<input name="refusepropal" type="submit" class="butActionDelete small wraponsmartphone marginbottomonly marginleftonly marginrightonly" value="'.$langs->trans("RefusePropal").'">';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|||||||
@ -247,7 +247,6 @@ $urlok = preg_replace('/&$/', '', $urlok); // Remove last &
|
|||||||
$urlko = preg_replace('/&$/', '', $urlko); // Remove last &
|
$urlko = preg_replace('/&$/', '', $urlko); // Remove last &
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Make special controls
|
// Make special controls
|
||||||
|
|
||||||
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) {
|
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) {
|
||||||
@ -300,21 +299,23 @@ if ($tmpsource == 'membersubscription') {
|
|||||||
}
|
}
|
||||||
$valid = true;
|
$valid = true;
|
||||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||||
$token = '';
|
$tokenisok = false;
|
||||||
$tokenoldcompat = '';
|
|
||||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||||
if ($tmpsource && $REF) {
|
if ($tmpsource && $REF) {
|
||||||
$token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$tmpsource.$REF, 2); // Use the source in the hash to avoid duplicates if the references are identical
|
// Use the source in the hash to avoid duplicates if the references are identical
|
||||||
|
$tokenisok = dol_verifyHash($conf->global->PAYMENT_SECURITY_TOKEN.$tmpsource.$REF, $SECUREKEY, '2');
|
||||||
|
// Do a second test for retro-compatibility (token may have been hashed with membersubscription in external module)
|
||||||
if ($tmpsource != $source) {
|
if ($tmpsource != $source) {
|
||||||
$tokenoldcompat = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$source.$REF, 2); // for retro-compatibility (token may have been hashed with membersubscription in external module)
|
$tokenisok = dol_verifyHash($conf->global->PAYMENT_SECURITY_TOKEN.$source.$REF, $SECUREKEY, '2');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2);
|
$tokenisok = dol_verifyHash($conf->global->PAYMENT_SECURITY_TOKEN, $SECUREKEY, '2');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$token = $conf->global->PAYMENT_SECURITY_TOKEN;
|
$tokenisok = ($conf->global->PAYMENT_SECURITY_TOKEN == $SECUREKEY);
|
||||||
}
|
}
|
||||||
if ($SECUREKEY != $token && (empty($tokenoldcompat) || $SECUREKEY != $tokenoldcompat)) {
|
|
||||||
|
if (! $tokenisok) {
|
||||||
if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) {
|
if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) {
|
||||||
$valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility
|
$valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility
|
||||||
} else {
|
} else {
|
||||||
@ -324,7 +325,7 @@ if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
|||||||
|
|
||||||
if (!$valid) {
|
if (!$valid) {
|
||||||
print '<div class="error">Bad value for key.</div>';
|
print '<div class="error">Bad value for key.</div>';
|
||||||
//print 'SECUREKEY='.$SECUREKEY.' token='.$token.' valid='.$valid;
|
//print 'SECUREKEY='.$SECUREKEY.' valid='.$valid;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -440,21 +441,21 @@ if ($action == 'dopayment') {
|
|||||||
$origfulltag = GETPOST("fulltag", 'alpha');
|
$origfulltag = GETPOST("fulltag", 'alpha');
|
||||||
|
|
||||||
// Securekey into back url useless for back url and we need an url lower than 150.
|
// Securekey into back url useless for back url and we need an url lower than 150.
|
||||||
$urlok = preg_replace('/securekey=[^&]+/', '', $urlok);
|
$urlok = preg_replace('/securekey=[^&]+&?/', '', $urlok);
|
||||||
$urlko = preg_replace('/securekey=[^&]+/', '', $urlko);
|
$urlko = preg_replace('/securekey=[^&]+&?/', '', $urlko);
|
||||||
|
|
||||||
if (empty($PRICE) || !is_numeric($PRICE)) {
|
if (empty($PRICE) || !is_numeric($PRICE)) {
|
||||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount"));
|
||||||
} elseif (empty($email)) {
|
} elseif (empty($email)) {
|
||||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("YourEMail"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ONLINE_PAYMENT_SENDEMAIL"));
|
||||||
} elseif (!isValidEMail($email)) {
|
} elseif (!isValidEMail($email)) {
|
||||||
$mesg = $langs->trans("ErrorBadEMail", $email);
|
$mesg = $langs->trans("ErrorBadEMail", $email);
|
||||||
} elseif (!$origfulltag) {
|
} elseif (!$origfulltag) {
|
||||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode"));
|
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode"));
|
||||||
} elseif (dol_strlen($urlok) > 150) {
|
} elseif (dol_strlen($urlok) > 150) {
|
||||||
$mesg = 'Error urlok too long '.$urlok.'( Paybox requires 150, found '.strlen($urlok).')';
|
$mesg = 'Error urlok too long '.$urlok.' (Paybox requires 150, found '.strlen($urlok).')';
|
||||||
} elseif (dol_strlen($urlko) > 150) {
|
} elseif (dol_strlen($urlko) > 150) {
|
||||||
$mesg = 'Error urlko too long '.$urlko.'( Paybox requires 150, found '.strlen($urlok).')';
|
$mesg = 'Error urlko too long '.$urlko.' (Paybox requires 150, found '.strlen($urlok).')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($mesg)) {
|
if (empty($mesg)) {
|
||||||
@ -984,13 +985,13 @@ if (!$source) {
|
|||||||
if (empty($amount) || !is_numeric($amount)) {
|
if (empty($amount) || !is_numeric($amount)) {
|
||||||
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
|
// Currency
|
||||||
|
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
||||||
}
|
}
|
||||||
// Currency
|
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
@ -1083,13 +1084,13 @@ if ($source == 'order') {
|
|||||||
if (empty($amount) || !is_numeric($amount)) {
|
if (empty($amount) || !is_numeric($amount)) {
|
||||||
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
|
// Currency
|
||||||
|
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
||||||
}
|
}
|
||||||
// Currency
|
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
@ -1214,18 +1215,16 @@ if ($source == 'invoice') {
|
|||||||
if (empty($amount) || !is_numeric($amount)) {
|
if (empty($amount) || !is_numeric($amount)) {
|
||||||
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
|
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
||||||
}
|
}
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($object->total_ttc, 1, $langs).'</b>';
|
print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
|
||||||
}
|
}
|
||||||
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Tag
|
// Tag
|
||||||
@ -1418,13 +1417,13 @@ if ($source == 'contractline') {
|
|||||||
if (empty($amount) || !is_numeric($amount)) {
|
if (empty($amount) || !is_numeric($amount)) {
|
||||||
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
|
// Currency
|
||||||
|
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
print '<input type="hidden" name="amount" value="'.$amount.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
print '<input type="hidden" name="newamount" value="'.$amount.'">';
|
||||||
}
|
}
|
||||||
// Currency
|
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
@ -1650,23 +1649,22 @@ if ($source == 'member' || $source == 'membersubscription') {
|
|||||||
}
|
}
|
||||||
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) {
|
if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) {
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamountbis" value="'.$valtoshow.'" disabled>';
|
print '<input class="flat maxwidth75" type="text" name="newamountbis" value="'.$valtoshow.'" disabled="disabled">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
||||||
} else {
|
} else {
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
|
||||||
}
|
}
|
||||||
|
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
||||||
} else {
|
} else {
|
||||||
$valtoshow = $amount;
|
$valtoshow = $amount;
|
||||||
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
|
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
|
||||||
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
||||||
$amount = $valtoshow;
|
$amount = $valtoshow;
|
||||||
}
|
}
|
||||||
print '<b>'.price($valtoshow).'</b>';
|
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
||||||
}
|
}
|
||||||
// Currency
|
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
@ -1811,18 +1809,18 @@ if ($source == 'donation') {
|
|||||||
}
|
}
|
||||||
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
|
||||||
|
// Currency
|
||||||
|
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
||||||
} else {
|
} else {
|
||||||
$valtoshow = $amount;
|
$valtoshow = $amount;
|
||||||
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
|
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
|
||||||
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
||||||
$amount = $valtoshow;
|
$amount = $valtoshow;
|
||||||
}
|
}
|
||||||
print '<b>'.price($valtoshow).'</b>';
|
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
||||||
}
|
}
|
||||||
// Currency
|
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
@ -1911,12 +1909,9 @@ if ($source == 'organizedeventregistration') {
|
|||||||
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
|
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
|
||||||
print '</td><td class="CTableRow2">';
|
print '</td><td class="CTableRow2">';
|
||||||
$valtoshow = $amount;
|
$valtoshow = $amount;
|
||||||
print '<b>'.price($valtoshow).'</b>';
|
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
||||||
|
|
||||||
// Currency
|
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
@ -1997,12 +1992,9 @@ if ($source == 'boothlocation') {
|
|||||||
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
|
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
|
||||||
print '</td><td class="CTableRow2">';
|
print '</td><td class="CTableRow2">';
|
||||||
$valtoshow = $amount;
|
$valtoshow = $amount;
|
||||||
print '<b>'.price($valtoshow).'</b>';
|
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
|
||||||
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
|
||||||
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
|
||||||
|
|
||||||
// Currency
|
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -2566,9 +2566,10 @@ class Societe extends CommonObject
|
|||||||
$linkstart = ''; $linkend = '';
|
$linkstart = ''; $linkend = '';
|
||||||
|
|
||||||
if (!empty($this->logo) && class_exists('Form')) {
|
if (!empty($this->logo) && class_exists('Form')) {
|
||||||
$label .= '<div class="photointooltip">';
|
$label .= '<div class="photointooltip floatright">';
|
||||||
$label .= Form::showphoto('societe', $this, 0, 40, 0, '', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
$label .= Form::showphoto('societe', $this, 0, 40, 0, 'photoref', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
||||||
$label .= '</div><div style="clear: both;"></div>';
|
$label .= '</div>';
|
||||||
|
//$label .= '<div style="clear: both;"></div>';
|
||||||
} elseif (!empty($this->logo_squarred) && class_exists('Form')) {
|
} elseif (!empty($this->logo_squarred) && class_exists('Form')) {
|
||||||
/*$label.= '<div class="photointooltip">';
|
/*$label.= '<div class="photointooltip">';
|
||||||
$label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
$label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
--colortopbordertitle1: rgb(<?php print $colortopbordertitle1; ?>);
|
--colortopbordertitle1: rgb(<?php print $colortopbordertitle1; ?>);
|
||||||
--listetotal: #888888;
|
--listetotal: #888888;
|
||||||
--inputbackgroundcolor: #FFF;
|
--inputbackgroundcolor: #FFF;
|
||||||
--inputbordercolor: rgba(0,0,0,.2);
|
--inputbordercolor: rgba(0,0,0,.15);
|
||||||
--tooltipbgcolor: <?php print $toolTipBgColor; ?>;
|
--tooltipbgcolor: <?php print $toolTipBgColor; ?>;
|
||||||
--tooltipfontcolor : <?php print $toolTipFontColor; ?>;
|
--tooltipfontcolor : <?php print $toolTipFontColor; ?>;
|
||||||
--oddevencolor: #202020;
|
--oddevencolor: #202020;
|
||||||
@ -144,11 +144,6 @@ tr.liste_titre th.liste_titre:not(.maxwidthsearch), tr.liste_titre td.liste_titr
|
|||||||
input {
|
input {
|
||||||
font-size: unset;
|
font-size: unset;
|
||||||
}
|
}
|
||||||
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
|
||||||
background-color: var(--inputbackgroundcolor);
|
|
||||||
color: var(--colortext);
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
select.vmenusearchselectcombo {
|
select.vmenusearchselectcombo {
|
||||||
background-color: unset;
|
background-color: unset;
|
||||||
}
|
}
|
||||||
@ -172,6 +167,39 @@ table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td.
|
|||||||
.liste_titre input[name=search_day_date_when], .liste_titre input[name=search_month_date_when], .liste_titre input[name=search_year_date_when],
|
.liste_titre input[name=search_day_date_when], .liste_titre input[name=search_month_date_when], .liste_titre input[name=search_year_date_when],
|
||||||
.liste_titre input[name=search_dtstartday], .liste_titre input[name=search_dtendday], .liste_titre input[name=search_dtstartmonth], .liste_titre input[name=search_dtendmonth],
|
.liste_titre input[name=search_dtstartday], .liste_titre input[name=search_dtendday], .liste_titre input[name=search_dtstartmonth], .liste_titre input[name=search_dtendmonth],
|
||||||
select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth,
|
select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth,
|
||||||
|
input, input.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||||
|
color: var(--colortext);
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: <?php print $fontlist ?>;
|
||||||
|
outline: none;
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
background-color: var(--inputbackgroundcolor);
|
||||||
|
<?php if (empty($conf->global->THEME_ADD_BACKGROUND_ON_INPUT)) { ?>
|
||||||
|
border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor);
|
||||||
|
<?php } ?>
|
||||||
|
}
|
||||||
|
|
||||||
|
.liste_titre input, .liste_titre select {
|
||||||
|
border: none;
|
||||||
|
border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor);
|
||||||
|
/* padding: 5px; */
|
||||||
|
}
|
||||||
|
.pageplusone,
|
||||||
|
div.tabBar input, div.tabBar input.flat, div.tabBar textarea, div.tabBar textarea.flat, div.tabBar form.flat select, div.tabBar select, div.tabBar select.flat, div.tabBar .dataTables_length label select
|
||||||
|
{
|
||||||
|
border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor);
|
||||||
|
<?php
|
||||||
|
if (!empty($conf->global->THEME_ADD_BACKGROUND_ON_INPUT)) { ?>
|
||||||
|
background-color: #f8f8fa;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
}
|
||||||
input[name=duration_value], input[name=durationhour]
|
input[name=duration_value], input[name=durationhour]
|
||||||
{
|
{
|
||||||
margin-right: 4px !important;
|
margin-right: 4px !important;
|
||||||
@ -182,24 +210,11 @@ input[type=submit], input[type=submit]:hover {
|
|||||||
input[type=checkbox], input[type=radio] {
|
input[type=checkbox], input[type=radio] {
|
||||||
margin: 0 3px 0 3px;
|
margin: 0 3px 0 3px;
|
||||||
}
|
}
|
||||||
input, input.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
outline: none;
|
|
||||||
margin: 0px 0px 0px 0px;
|
|
||||||
border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor);
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
input {
|
||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
.liste_titre input {
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
select {
|
select {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
@ -243,11 +258,14 @@ input:invalid, select:invalid, input.--error , select.--error {
|
|||||||
.field-error-icon { color: #ea1212; !important; }
|
.field-error-icon { color: #ea1212; !important; }
|
||||||
|
|
||||||
/* Focus definitions must be after standard definition */
|
/* Focus definitions must be after standard definition */
|
||||||
textarea:focus {
|
div.tabBar textarea:focus {
|
||||||
border: 1px solid #aaa !important;
|
border: 1px solid #aaa !important;
|
||||||
}
|
}
|
||||||
input:focus, select:focus {
|
input:focus:not(.select2-search__field), select:focus, .select2-container--open .select2-selection--single {
|
||||||
border-bottom: 1px solid #666;
|
/* div.tabBar input:focus, div.tabBar select:focus { */
|
||||||
|
border-bottom: 1px solid #666 !important;
|
||||||
|
border-bottom-left-radius: 0 !important;
|
||||||
|
border-bottom-right-radius: 0 !important;
|
||||||
}
|
}
|
||||||
textarea.cke_source:focus
|
textarea.cke_source:focus
|
||||||
{
|
{
|
||||||
@ -258,10 +276,10 @@ div#cke_dp_desc {
|
|||||||
}
|
}
|
||||||
textarea {
|
textarea {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-top:solid 1px rgba(0,0,0,.2);
|
border-top: solid 1px var(--inputbordercolor);
|
||||||
border-left:solid 1px rgba(0,0,0,.2);
|
border-left: solid 1px var(--inputbordercolor);
|
||||||
border-right:solid 1px rgba(0,0,0,.2);
|
border-right: solid 1px var(--inputbordercolor);
|
||||||
border-bottom:solid 1px rgba(0,0,0,.2);
|
border-bottom: solid 1px var(--inputbordercolor);
|
||||||
|
|
||||||
padding:4px;
|
padding:4px;
|
||||||
margin-left:0px;
|
margin-left:0px;
|
||||||
@ -390,7 +408,7 @@ td.rightborder {
|
|||||||
border-right: 1px solid #ccc;
|
border-right: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.amount, span.amount, div.amount {
|
td.amount, span.amount, div.amount, b.amount {
|
||||||
color: #006666;
|
color: #006666;
|
||||||
}
|
}
|
||||||
td.actionbuttons a {
|
td.actionbuttons a {
|
||||||
@ -403,6 +421,10 @@ select.flat, form.flat select, .pageplusone {
|
|||||||
input.pageplusone {
|
input.pageplusone {
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.paginationlastpage a {
|
||||||
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.saturatemedium {
|
.saturatemedium {
|
||||||
@ -462,7 +484,7 @@ input.removedfile {
|
|||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
input[type=file ] {
|
input[type=file] {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
<?php if (empty($conf->global->THEME_SHOW_BORDER_ON_INPUT)) { ?>
|
<?php if (empty($conf->global->THEME_SHOW_BORDER_ON_INPUT)) { ?>
|
||||||
@ -680,10 +702,10 @@ textarea.centpercent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.flip {
|
.flip {
|
||||||
transform: scaleX(-1) translate(2px, 0);
|
transform: scaleX(-1) translate(<?php print ($left == 'left' ? '' : '-'); ?>2px, 0);
|
||||||
}
|
}
|
||||||
.rotate90 {
|
.rotate90 {
|
||||||
transform: rotate(90deg) translate(0, 2px);
|
transform: rotate(90deg) translate(0, <?php print ($left == 'left' ? '' : '-'); ?>2px);
|
||||||
}
|
}
|
||||||
.center {
|
.center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -994,7 +1016,7 @@ div.divsearchfield {
|
|||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
border-bottom: solid 1px rgba(0,0,0,.2);
|
border-bottom: solid 1px var(--inputbordercolor);
|
||||||
height: 24px;
|
height: 24px;
|
||||||
}
|
}
|
||||||
.search_component_searchtext {
|
.search_component_searchtext {
|
||||||
@ -1109,6 +1131,10 @@ ul.attendees li {
|
|||||||
}
|
}
|
||||||
select.flat.selectlimit {
|
select.flat.selectlimit {
|
||||||
max-width: 62px;
|
max-width: 62px;
|
||||||
|
text-align: end;
|
||||||
|
border-bottom: 1px solid var(--inputbordercolor);
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
.selectlimit, .marginrightonly {
|
.selectlimit, .marginrightonly {
|
||||||
margin-<?php echo $right; ?>: 10px !important;
|
margin-<?php echo $right; ?>: 10px !important;
|
||||||
@ -5843,6 +5869,8 @@ input.select2-input {
|
|||||||
}
|
}
|
||||||
.select2-container--focus span.select2-selection.select2-selection--single {
|
.select2-container--focus span.select2-selection.select2-selection--single {
|
||||||
border-bottom: 1px solid #666 !important;
|
border-bottom: 1px solid #666 !important;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blockvmenusearch .select2-container--default .select2-selection--single,
|
.blockvmenusearch .select2-container--default .select2-selection--single,
|
||||||
@ -5917,19 +5945,25 @@ input.select2-input {
|
|||||||
|
|
||||||
-webkit-box-shadow: none !important;
|
-webkit-box-shadow: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
border-radius: 0 !important;
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.select2-container--focus .select2-container--default .select2-selection--single {
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
.select2-container--default .select2-selection--multiple {
|
.select2-container--default .select2-selection--multiple {
|
||||||
border-bottom: solid 1px var(--inputbordercolor);
|
border-bottom: solid 1px var(--inputbordercolor);
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-radius: 0 !important;
|
border-radius: 3px;
|
||||||
background: var(--inputbackgroundcolor);
|
background: var(--inputbackgroundcolor);
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
@ -5947,7 +5981,7 @@ input.select2-input {
|
|||||||
border-top: none !important;
|
border-top: none !important;
|
||||||
border-left: none !important;
|
border-left: none !important;
|
||||||
border-right: none !important;
|
border-right: none !important;
|
||||||
border-bottom: solid 1px rgba(0,0,0,.2) !important;
|
border-bottom: solid 1px var(--inputbordercolor) !important;
|
||||||
-webkit-box-shadow: none !important;
|
-webkit-box-shadow: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
@ -6027,6 +6061,7 @@ a span.select2-chosen
|
|||||||
}
|
}
|
||||||
.select2-results__option {
|
.select2-results__option {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
||||||
background-color: var(--colorbackvmenu1);
|
background-color: var(--colorbackvmenu1);
|
||||||
@ -6196,14 +6231,17 @@ span.noborderoncategories {
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
|
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: solid 1px rgba(0,0,0,.2);
|
border-bottom: solid 1px var(--inputbordercolor);
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
height: 17px;
|
height: 17px;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
.multi-select-button:focus {
|
.multi-select-button:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-bottom: 1px solid #666;
|
border-bottom: 1px solid #666;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.multi-select-button:after {
|
.multi-select-button:after {
|
||||||
@ -6227,7 +6265,10 @@ span.noborderoncategories {
|
|||||||
.multi-select-menuitem {
|
.multi-select-menuitem {
|
||||||
clear: both;
|
clear: both;
|
||||||
float: left;
|
float: left;
|
||||||
padding-left: 5px
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
label.multi-select-menuitem {
|
||||||
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -417,7 +417,7 @@ select#date_startday, select#date_startmonth, select#date_endday, select#date_en
|
|||||||
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
border: none;
|
border: none;
|
||||||
border<?php echo empty($conf->global->THEME_HIDE_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px rgba(0,0,0,.2);
|
border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor);
|
||||||
outline: none;
|
outline: none;
|
||||||
margin: 0px 0px 0px 0px;
|
margin: 0px 0px 0px 0px;
|
||||||
}
|
}
|
||||||
@ -465,10 +465,10 @@ input.short {
|
|||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-top:solid 1px rgba(0,0,0,.1);
|
border-top:solid 1px var(--inputbordercolor);
|
||||||
border-left:solid 1px rgba(0,0,0,.1);
|
border-left:solid 1px var(--inputbordercolor);
|
||||||
border-right:solid 1px rgba(0,0,0,.1);
|
border-right:solid 1px var(--inputbordercolor);
|
||||||
border-bottom:solid 1px rgba(0,0,0,.2);
|
border-bottom:solid 1px var(--inputbordercolor);
|
||||||
|
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
padding:4px;
|
padding:4px;
|
||||||
@ -590,7 +590,7 @@ td.rightborder {
|
|||||||
border-right: 1px solid #ccc;
|
border-right: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.amount, span.amount, div.amount {
|
td.amount, span.amount, div.amount, b.amount {
|
||||||
color: #006666;
|
color: #006666;
|
||||||
}
|
}
|
||||||
td.actionbuttons a {
|
td.actionbuttons a {
|
||||||
@ -849,10 +849,10 @@ textarea.centpercent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.flip {
|
.flip {
|
||||||
transform: scaleX(-1) translate(2px, 0);
|
transform: scaleX(-1) translate(<?php print ($left == 'left' ? '' : '-'); ?>2px, 0);
|
||||||
}
|
}
|
||||||
.rotate90 {
|
.rotate90 {
|
||||||
transform: rotate(90deg) translate(0, 2px);
|
transform: rotate(90deg) translate(0, <?php print ($left == 'left' ? '' : '-'); ?>2px);
|
||||||
}
|
}
|
||||||
.center {
|
.center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -3612,8 +3612,10 @@ tr.liste_titre_filter td.liste_titre {
|
|||||||
table.liste th, table.noborder th, table.noborder tr.liste_titre td {
|
table.liste th, table.noborder th, table.noborder tr.liste_titre td {
|
||||||
padding: 8px 6px 8px 6px; /* t r b l */
|
padding: 8px 6px 8px 6px; /* t r b l */
|
||||||
}
|
}
|
||||||
table.noborder td, div.noborder form, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td {
|
|
||||||
|
table.liste td, table.noborder td, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td {
|
||||||
padding: 4px 6px 4px 6px; /* t r b l */
|
padding: 4px 6px 4px 6px; /* t r b l */
|
||||||
|
height: 22px;
|
||||||
}
|
}
|
||||||
form.tagtable {
|
form.tagtable {
|
||||||
padding: unset !important;
|
padding: unset !important;
|
||||||
@ -5903,6 +5905,7 @@ a span.select2-chosen
|
|||||||
}
|
}
|
||||||
.select2-results__option {
|
.select2-results__option {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
.select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
@ -6099,6 +6102,9 @@ span.noborderoncategories {
|
|||||||
float: left;
|
float: left;
|
||||||
padding-left: 5px
|
padding-left: 5px
|
||||||
}
|
}
|
||||||
|
label.multi-select-menuitem {
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|||||||
@ -2113,7 +2113,7 @@ class User extends CommonObject
|
|||||||
* @param int $notrigger 1=Does not launch triggers
|
* @param int $notrigger 1=Does not launch triggers
|
||||||
* @param int $nosyncmember Do not synchronize linked member
|
* @param int $nosyncmember Do not synchronize linked member
|
||||||
* @param int $passwordalreadycrypted 0=Value is cleartext password, 1=Value is crypted value.
|
* @param int $passwordalreadycrypted 0=Value is cleartext password, 1=Value is crypted value.
|
||||||
* @return string If OK return clear password, 0 if no change, < 0 if error
|
* @return string If OK return clear password, 0 if no change (warning, you may retreive 1 instead of 0 even if password was same), < 0 if error
|
||||||
*/
|
*/
|
||||||
public function setPassword($user, $password = '', $changelater = 0, $notrigger = 0, $nosyncmember = 0, $passwordalreadycrypted = 0)
|
public function setPassword($user, $password = '', $changelater = 0, $notrigger = 0, $nosyncmember = 0, $passwordalreadycrypted = 0)
|
||||||
{
|
{
|
||||||
@ -2600,9 +2600,10 @@ class User extends CommonObject
|
|||||||
$companylink = '';
|
$companylink = '';
|
||||||
|
|
||||||
if (!empty($this->photo)) {
|
if (!empty($this->photo)) {
|
||||||
$label .= '<div class="photointooltip">';
|
$label .= '<div class="photointooltip floatright">';
|
||||||
$label .= Form::showphoto('userphoto', $this, 0, 60, 0, 'photowithmargin photologintooltip', 'small', 0, 1); // Force height to 60 so we total height of tooltip can be calculated and collision can be managed
|
$label .= Form::showphoto('userphoto', $this, 0, 60, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1); // Force height to 60 so we total height of tooltip can be calculated and collision can be managed
|
||||||
$label .= '</div><div style="clear: both;"></div>';
|
$label .= '</div>';
|
||||||
|
//$label .= '<div style="clear: both;"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info Login
|
// Info Login
|
||||||
|
|||||||
@ -290,7 +290,7 @@ class UserTest extends PHPUnit\Framework\TestCase
|
|||||||
$conf->global->USER_PASSWORD_GENERATED = 'standard';
|
$conf->global->USER_PASSWORD_GENERATED = 'standard';
|
||||||
|
|
||||||
$localobject->error = '';
|
$localobject->error = '';
|
||||||
$result = $localobject->setPassword($user, '12345678901');
|
$result = $localobject->setPassword($user, '123456789AA');
|
||||||
print __METHOD__." set a too small password with USER_PASSWORD_GENERATED = standard\n";
|
print __METHOD__." set a too small password with USER_PASSWORD_GENERATED = standard\n";
|
||||||
print __METHOD__." localobject->error=".$localobject->error."\n";
|
print __METHOD__." localobject->error=".$localobject->error."\n";
|
||||||
$this->assertEquals(-1, $result, 'We must receive a negative error code (pass too small) and we did not here');
|
$this->assertEquals(-1, $result, 'We must receive a negative error code (pass too small) and we did not here');
|
||||||
@ -301,7 +301,7 @@ class UserTest extends PHPUnit\Framework\TestCase
|
|||||||
$conf->global->USER_PASSWORD_PATTERN = '12;2;2;2;3;1';
|
$conf->global->USER_PASSWORD_PATTERN = '12;2;2;2;3;1';
|
||||||
|
|
||||||
$localobject->error = '';
|
$localobject->error = '';
|
||||||
$result = $localobject->setPassword($user, '12345678901');
|
$result = $localobject->setPassword($user, '1234567892BB');
|
||||||
print __METHOD__." set a too small password with USER_PASSWORD_GENERATED = perso\n";
|
print __METHOD__." set a too small password with USER_PASSWORD_GENERATED = perso\n";
|
||||||
print __METHOD__." localobject->error=".$localobject->error."\n";
|
print __METHOD__." localobject->error=".$localobject->error."\n";
|
||||||
$this->assertEquals(-1, $result, 'We must receive a negative error code (pass too small) and we did not here');
|
$this->assertEquals(-1, $result, 'We must receive a negative error code (pass too small) and we did not here');
|
||||||
@ -321,10 +321,10 @@ class UserTest extends PHPUnit\Framework\TestCase
|
|||||||
$this->assertEquals(-1, $result, 'We must receive a negative error code (pass without enough uppercase) and we did not here');
|
$this->assertEquals(-1, $result, 'We must receive a negative error code (pass without enough uppercase) and we did not here');
|
||||||
|
|
||||||
$localobject->error = '';
|
$localobject->error = '';
|
||||||
$result = $localobject->setPassword($user, '$*34567890AB');
|
$result = $localobject->setPassword($user, '$*34567890CD');
|
||||||
print __METHOD__." set a password with enough uppercase\n";
|
print __METHOD__." set a password with enough uppercase\n";
|
||||||
print __METHOD__." localobject->error=".$localobject->error."\n";
|
print __METHOD__." localobject->error=".$localobject->error."\n";
|
||||||
$this->assertEquals('$*34567890AB', $result, 'We must get the password as it is valid (pass with enough uppercase) and we did not here');
|
$this->assertEquals('$*34567890CD', $result, 'We must get the password as it is valid (pass with enough uppercase) and we did not here');
|
||||||
|
|
||||||
// Test digits : $chartofound = "!@#$%&*()_-+={}[]\\|:;'/";
|
// Test digits : $chartofound = "!@#$%&*()_-+={}[]\\|:;'/";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user