Task 515 : New field added on contact : no_email
This commit is contained in:
parent
4a5d89e6cc
commit
06ab1f6f94
@ -72,6 +72,7 @@ class Contact extends CommonObject
|
||||
var $birthday;
|
||||
var $default_lang;
|
||||
var $note; // Private note
|
||||
var $no_email; // 1=Don't send e-mail to this contact, 0=do
|
||||
|
||||
var $ref_facturation; // Nb de reference facture pour lequel il est contact
|
||||
var $ref_contrat; // Nb de reference contrat pour lequel il est contact
|
||||
@ -250,6 +251,7 @@ class Contact extends CommonObject
|
||||
$sql .= ", priv = '".$this->priv."'";
|
||||
$sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null");
|
||||
$sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"null");
|
||||
$sql .= ", no_email=".($this->no_email?"'".$this->no_email."'":"null");
|
||||
$sql .= " WHERE rowid=".$id;
|
||||
|
||||
dol_syslog(get_class($this)."::update sql=".$sql,LOG_DEBUG);
|
||||
@ -468,7 +470,7 @@ class Contact extends CommonObject
|
||||
$sql.= " c.fk_departement,";
|
||||
$sql.= " c.birthday,";
|
||||
$sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid,";
|
||||
$sql.= " c.priv, c.note, c.default_lang, c.canvas,";
|
||||
$sql.= " c.priv, c.note, c.default_lang, c.no_email, c.canvas,";
|
||||
$sql.= " c.import_key,";
|
||||
$sql.= " p.libelle as country, p.code as country_code,";
|
||||
$sql.= " d.nom as state, d.code_departement as state_code,";
|
||||
@ -536,6 +538,7 @@ class Contact extends CommonObject
|
||||
$this->birthday = $this->db->jdate($obj->birthday);
|
||||
$this->note = $obj->note;
|
||||
$this->default_lang = $obj->default_lang;
|
||||
$this->no_email = $obj->no_email;
|
||||
$this->user_id = $obj->user_id;
|
||||
$this->user_login = $obj->user_login;
|
||||
$this->canvas = $obj->canvas;
|
||||
|
||||
@ -146,6 +146,7 @@ if (empty($reshook))
|
||||
$object->phone_mobile = $_POST["phone_mobile"];
|
||||
$object->fax = $_POST["fax"];
|
||||
$object->jabberid = $_POST["jabberid"];
|
||||
$object->no_email = $_POST["no_email"];
|
||||
$object->priv = $_POST["priv"];
|
||||
$object->note = $_POST["note"];
|
||||
|
||||
@ -237,6 +238,7 @@ if (empty($reshook))
|
||||
$object->phone_mobile = $_POST["phone_mobile"];
|
||||
$object->fax = $_POST["fax"];
|
||||
$object->jabberid = $_POST["jabberid"];
|
||||
$object->no_email = $_POST["no_email"];
|
||||
$object->priv = $_POST["priv"];
|
||||
$object->note = $_POST["note"];
|
||||
|
||||
@ -448,8 +450,9 @@ else
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("Email").'</td><td colspan="3"><input name="email" type="text" size="50" maxlength="80" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td></tr>';
|
||||
|
||||
// Instant message
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
||||
// Instant message and no email
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email)).'</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
@ -623,7 +626,8 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Jabberid
|
||||
print '<tr><td>Jabberid</td><td colspan="3"><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
||||
print '<tr><td>Jabberid</td><td><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email)).'</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
@ -815,8 +819,9 @@ else
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Instant message
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3">'.$object->jabberid.'</td></tr>';
|
||||
// Instant message and no email
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td>'.$object->jabberid.'</td>';
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$object->no_email.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
print $object->LibPubPriv($object->priv);
|
||||
|
||||
@ -71,3 +71,5 @@ ALTER TABLE llx_commande_fournisseur CHANGE fk_methode_commande fk_input_method
|
||||
INSERT INTO llx_const (name, value, type, note, visible) values ('PRODUCT_CODEPRODUCT_ADDON','mod_codeproduct_leopard','yesno','Module to control product codes',0);
|
||||
|
||||
ALTER TABLE llx_c_barcode_type ADD UNIQUE INDEX uk_c_barcode_type(code, entity);
|
||||
|
||||
ALTER TABLE llx_socpeople ADD column no_email SMALLINT NOT NULL DEFAULT 0 AFTER priv;
|
||||
|
||||
@ -41,6 +41,7 @@ create table llx_socpeople
|
||||
fax varchar(30),
|
||||
email varchar(255),
|
||||
jabberid varchar(255),
|
||||
no_email smallint NOT NULL DEFAULT 0,
|
||||
priv smallint NOT NULL DEFAULT 0,
|
||||
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
|
||||
fk_user_modif integer,
|
||||
|
||||
@ -68,6 +68,7 @@ Phone=Phone
|
||||
PhonePro=Prof. phone
|
||||
PhonePerso=Pers. phone
|
||||
PhoneMobile=Mobile
|
||||
No_Email=Don't send e-mail
|
||||
Fax=Fax
|
||||
Zip=Zip Code
|
||||
Town=City
|
||||
|
||||
@ -70,6 +70,7 @@ Phone=Téléphone
|
||||
PhonePro=Tél pro.
|
||||
PhonePerso=Tél perso.
|
||||
PhoneMobile=Tél portable
|
||||
No_Email=Ne pas envoyer d'e-mail
|
||||
Fax=Fax
|
||||
Zip=Code postal
|
||||
Town=Ville
|
||||
|
||||
Loading…
Reference in New Issue
Block a user