Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2022-07-05 09:42:48 +02:00
commit 7dc1714537
4 changed files with 19 additions and 12 deletions

View File

@ -646,7 +646,7 @@ if ($mode == 'login') {
print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') ';
}
if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin">' . img_delete($langs->trans("Delete")) . '</a>';
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin&token='.newToken().'">' . img_delete($langs->trans("Delete")) . '</a>';
if (file_exists($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_LOGIN_BACKGROUND)) {
print ' &nbsp; ';
print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&amp;file=' . urlencode('logos/' . $conf->global->MAIN_LOGIN_BACKGROUND) . '">';

View File

@ -1551,7 +1551,7 @@ class FormMail extends Form
if (!empty($extrafields->attributes[$product->table_element]['label']) && is_array($extrafields->attributes[$product->table_element]['label']) && count($extrafields->attributes[$product->table_element]['label']) > 0) {
foreach ($extrafields->attributes[$product->table_element]['label'] as $key => $label) {
$substit_line['__PRODUCT_EXTRAFIELD_'.strtoupper($key).'__'] = $product->array_options['options_'.$key];
$substit_line['__PRODUCT_EXTRAFIELD_'.strtoupper($key).'__'] = isset($product->array_options['options_'.$key]) ? $product->array_options['options_'.$key] : '';
}
}
}

View File

@ -72,19 +72,25 @@ class InterfaceWorkflowManager extends DolibarrTriggers
if ($action == 'PROPAL_CLOSE_SIGNED') {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) {
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$newobject = new Commande($this->db);
$object->fetchObjectLinked();
if (!empty($object->linkedObjectsIds['commande'])) {
setEventMessages($langs->trans("OrderExists"), null, 'warnings');
return $ret;
} else {
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$newobject = new Commande($this->db);
$newobject->context['createfrompropal'] = 'createfrompropal';
$newobject->context['origin'] = $object->element;
$newobject->context['origin_id'] = $object->id;
$newobject->context['createfrompropal'] = 'createfrompropal';
$newobject->context['origin'] = $object->element;
$newobject->context['origin_id'] = $object->id;
$ret = $newobject->createFromProposal($object, $user);
if ($ret < 0) {
$this->error = $newobject->error;
$this->errors[] = $newobject->error;
$ret = $newobject->createFromProposal($object, $user);
if ($ret < 0) {
$this->error = $newobject->error;
$this->errors[] = $newobject->error;
}
return $ret;
}
return $ret;
}
}

View File

@ -1,4 +1,5 @@
# Dolibarr language file - Source file is en_US - orders
OrderExists=An order was already open linked to this proposal, so no other order was created automatically
OrdersArea=Customers orders area
SuppliersOrdersArea=Purchase orders area
OrderCard=Order card