Fix: field too short
This commit is contained in:
parent
098b11e5f8
commit
29217c5270
@ -105,8 +105,8 @@ class ActionComm extends CommonObject
|
|||||||
$now=dol_now('tzserver');
|
$now=dol_now('tzserver');
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->label=trim($this->label);
|
$this->label=dol_trunc(trim($this->label),128);
|
||||||
$this->location=trim($this->location);
|
$this->location=dol_trunc(trim($this->location),128);
|
||||||
$this->note=dol_htmlcleanlastbr(trim($this->note));
|
$this->note=dol_htmlcleanlastbr(trim($this->note));
|
||||||
if (! $this->percentage) $this->percentage = 0;
|
if (! $this->percentage) $this->percentage = 0;
|
||||||
if (! $this->priority) $this->priority = 0;
|
if (! $this->priority) $this->priority = 0;
|
||||||
|
|||||||
@ -34,3 +34,5 @@ ALTER TABLE llx_notify_def ADD COLUMN type varchar(16) DEFAULT 'email';
|
|||||||
ALTER TABLE llx_notify MODIFY fk_contact integer NULL;
|
ALTER TABLE llx_notify MODIFY fk_contact integer NULL;
|
||||||
ALTER TABLE llx_notify ADD COLUMN fk_user integer NULL after fk_contact;
|
ALTER TABLE llx_notify ADD COLUMN fk_user integer NULL after fk_contact;
|
||||||
ALTER TABLE llx_notify ADD COLUMN type varchar(16) DEFAULT 'email';
|
ALTER TABLE llx_notify ADD COLUMN type varchar(16) DEFAULT 'email';
|
||||||
|
|
||||||
|
ALTER TABLE llx_actioncomm MODIFY label varchar(128) NOT NULL;
|
||||||
|
|||||||
@ -30,7 +30,7 @@ create table llx_actioncomm
|
|||||||
datea2 datetime, -- deprecated
|
datea2 datetime, -- deprecated
|
||||||
|
|
||||||
fk_action integer, -- type de l'action
|
fk_action integer, -- type de l'action
|
||||||
label varchar(50) NOT NULL, -- libelle de l'action
|
label varchar(128) NOT NULL, -- libelle de l'action
|
||||||
|
|
||||||
datec datetime, -- date creation
|
datec datetime, -- date creation
|
||||||
tms timestamp, -- date modif
|
tms timestamp, -- date modif
|
||||||
|
|||||||
@ -186,13 +186,15 @@ class Societe extends CommonObject
|
|||||||
if ($this->code_client == -1) $this->get_codeclient($this->prefix_comm,0);
|
if ($this->code_client == -1) $this->get_codeclient($this->prefix_comm,0);
|
||||||
if ($this->code_fournisseur == -1) $this->get_codefournisseur($this->prefix_comm,1);
|
if ($this->code_fournisseur == -1) $this->get_codefournisseur($this->prefix_comm,1);
|
||||||
|
|
||||||
|
$now=dol_now();
|
||||||
|
|
||||||
// Check more parameters
|
// Check more parameters
|
||||||
$result = $this->verify();
|
$result = $this->verify();
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe (nom, entity, datec, datea, fk_user_creat)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe (nom, entity, datec, datea, fk_user_creat)";
|
||||||
$sql.= " VALUES ('".addslashes($this->nom)."', ".$conf->entity.", ".$this->db->idate(gmmktime()).", ".$this->db->idate(gmmktime()).",";
|
$sql.= " VALUES ('".$db->escape($this->nom)."', ".$conf->entity.", '".$this->db->idate($now)."', '".$this->db->idate($now)."',";
|
||||||
$sql.= " ".($user->id > 0 ? "'".$user->id."'":"null");
|
$sql.= " ".($user->id > 0 ? "'".$user->id."'":"null");
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
|
|
||||||
|
|||||||
@ -477,9 +477,10 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Name, firstname
|
||||||
if ($soc->particulier)
|
if ($soc->particulier)
|
||||||
{
|
{
|
||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('LastName').'</span></td><td><input type="text" size="30" name="nom" value="'.$soc->nom.'"></td>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans('LastName').'</span></td><td><input type="text" size="30" maxlength="60" name="nom" value="'.$soc->nom.'"></td>';
|
||||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('FirstName').'</td><td><input type="text" size="30" name="prenom" value="'.$soc->firstname.'"></td>';
|
print '<tr><td>'.$langs->trans('FirstName').'</td><td><input type="text" size="30" name="prenom" value="'.$soc->firstname.'"></td>';
|
||||||
print '<td colspan=2> </td></tr>';
|
print '<td colspan=2> </td></tr>';
|
||||||
@ -489,7 +490,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('Name').'</span></td><td><input type="text" size="30" name="nom" value="'.$soc->nom.'"></td>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans('Name').'</span></td><td><input type="text" size="30" maxlength="60" name="nom" value="'.$soc->nom.'"></td>';
|
||||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user