FIX Rename title of template invoice

This commit is contained in:
Laurent Destailleur 2021-02-15 22:15:14 +01:00
parent 00642ffb48
commit dabf9d796a
2 changed files with 5 additions and 5 deletions

View File

@ -289,11 +289,11 @@ if (empty($reshook))
elseif ($action == 'setref' && $user->rights->facture->creer)
{
//var_dump(GETPOST('ref', 'alpha'));exit;
$result = $object->setValueFrom('title', $ref, '', null, 'text', '', $user, 'BILLREC_MODIFY');
$result = $object->setValueFrom('titre', $ref, '', null, 'text', '', $user, 'BILLREC_MODIFY');
if ($result > 0)
{
$object->titre = GETPOST('ref', 'alpha'); // deprecated
$object->title = GETPOST('ref', 'alpha');
$object->titre = $ref; // deprecated
$object->title = $ref;
$object->ref = $object->title;
} else {
$error++;

View File

@ -253,9 +253,9 @@ class Form
if (empty($notabletag)) $ret .= '<td class="left">';
//else $ret.='<div class="clearboth"></div>';
$ret .= '<input type="submit" class="button'.(empty($notabletag) ? '' : ' ').'" name="modify" value="'.$langs->trans("Modify").'">';
$ret .= '<input type="submit" class="smallpaddingimp button'.(empty($notabletag) ? '' : ' ').'" name="modify" value="'.$langs->trans("Modify").'">';
if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= '<br>'."\n";
$ret .= '<input type="submit" class="button button-cancel'.(empty($notabletag) ? '' : ' ').'" name="cancel" value="'.$langs->trans("Cancel").'">';
$ret .= '<input type="submit" class="smallpaddingimp button button-cancel'.(empty($notabletag) ? '' : ' ').'" name="cancel" value="'.$langs->trans("Cancel").'">';
if (empty($notabletag)) $ret .= '</td>';
if (empty($notabletag)) $ret .= '</tr></table>'."\n";