Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
d7cbd8a1d4
@ -319,6 +319,10 @@ class FormMail extends Form
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $user, $hookmanager, $form;
|
||||
|
||||
// Required to show preview of mail attachments
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
$formfile = new Formfile($this->db);
|
||||
|
||||
if (!is_object($form)) $form = new Form($this->db);
|
||||
|
||||
// Load translation files required by the page
|
||||
@ -845,7 +849,10 @@ class FormMail extends Form
|
||||
foreach ($listofpaths as $key => $val)
|
||||
{
|
||||
$out .= '<div id="attachfile_'.$key.'">';
|
||||
// Preview of attachment
|
||||
preg_match('#^(/)(\w+)(/)(.+)$#', substr($val, (strlen(DOL_DATA_ROOT)-strlen($val))), $formfile_params);
|
||||
$out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
|
||||
$out .= $formfile->showPreview(array(), $formfile_params[2], $formfile_params[4]);
|
||||
if (!$this->withfilereadonly)
|
||||
{
|
||||
$out .= ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="'.($key + 1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
||||
|
||||
@ -713,7 +713,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray',
|
||||
$notnull = ($obj->Null == 'YES' ? 0 : 1);
|
||||
if ($fieldname == 'fk_user_modif') $notnull = -1;
|
||||
// label
|
||||
$label = preg_replace('/_/', ' ', ucfirst($fieldname));
|
||||
$label = preg_replace('/_/', '', ucfirst($fieldname));
|
||||
if ($fieldname == 'rowid') $label = 'TechnicalID';
|
||||
if ($fieldname == 'import_key') $label = 'ImportId';
|
||||
if ($fieldname == 'fk_soc') $label = 'ThirdParty';
|
||||
|
||||
@ -95,8 +95,8 @@ if (GETPOST('action', 'alpha') == 'set')
|
||||
$res = dolibarr_set_const($db, "TAKEPOS_ADDON".$terminaltouse, GETPOST('TAKEPOS_ADDON'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
// add free text on each terminal of cash desk
|
||||
$res = dolibarr_set_const($db, 'TAKEPOS_HEADER'.$terminaltouse, GETPOST('TAKEPOS_HEADER'.$terminaltouse, 'none'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, 'TAKEPOS_FOOTER'.$terminaltouse, GETPOST('TAKEPOS_FOOTER'.$terminaltouse, 'none'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, 'TAKEPOS_HEADER'.$terminaltouse, GETPOST('TAKEPOS_HEADER'.$terminaltouse, 'restricthtml'), 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, 'TAKEPOS_FOOTER'.$terminaltouse, GETPOST('TAKEPOS_FOOTER'.$terminaltouse, 'restricthtml'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user