Module member: move field note in note_private
This commit is contained in:
parent
4588b2bb4c
commit
d897139f25
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -77,7 +77,7 @@ class Adherent extends CommonObject
|
||||
|
||||
var $morphy;
|
||||
var $public;
|
||||
var $note; // Private note
|
||||
var $note_private; // Private note
|
||||
var $statut; // -1:brouillon, 0:resilie, >=1:valide,paye
|
||||
var $photo;
|
||||
|
||||
@ -310,7 +310,7 @@ class Adherent extends CommonObject
|
||||
$sql.= " VALUES (";
|
||||
$sql.= " '".$this->db->idate($this->datec)."'";
|
||||
$sql.= ", ".($this->login?"'".$this->db->escape($this->login)."'":"null");
|
||||
$sql.= ", ".($user->id>0?$user->id:"null"); // Can be null because member can be createb by a guest or a script
|
||||
$sql.= ", ".($user->id>0?$user->id:"null"); // Can be null because member can be created by a guest or a script
|
||||
$sql.= ", null, null, '".$this->morphy."'";
|
||||
$sql.= ", '".$this->typeid."'";
|
||||
$sql.= ", ".$conf->entity;
|
||||
@ -445,9 +445,9 @@ class Adherent extends CommonObject
|
||||
$sql.= ", email='".$this->email."'";
|
||||
$sql.= ", skype='".$this->skype."'";
|
||||
$sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null");
|
||||
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
|
||||
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
|
||||
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
|
||||
$sql.= ", note=" .($this->note?"'".$this->db->escape($this->note)."'":"null");
|
||||
$sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
||||
$sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null");
|
||||
$sql.= ", public='".$this->public."'";
|
||||
$sql.= ", statut=" .$this->statut;
|
||||
@ -1053,7 +1053,7 @@ class Adherent extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,";
|
||||
$sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,";
|
||||
$sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
||||
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
||||
$sql.= " d.datec as datec,";
|
||||
@ -1134,7 +1134,7 @@ class Adherent extends CommonObject
|
||||
$this->datevalid = $this->db->jdate($obj->datev);
|
||||
$this->birth = $this->db->jdate($obj->birthday);
|
||||
|
||||
$this->note = $obj->note;
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->morphy = $obj->morphy;
|
||||
|
||||
$this->typeid = $obj->fk_adherent_type;
|
||||
@ -1801,7 +1801,7 @@ class Adherent extends CommonObject
|
||||
$this->phone = '0999999999';
|
||||
$this->phone_perso = '0999999998';
|
||||
$this->phone_mobile = '0999999997';
|
||||
$this->note='No comment';
|
||||
$this->note_private='No comment';
|
||||
$this->birth=time();
|
||||
$this->photo='';
|
||||
$this->public=1;
|
||||
@ -1874,7 +1874,7 @@ class Adherent extends CommonObject
|
||||
if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
|
||||
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
||||
if ($this->fax && ! empty($conf->global->LDAP_MEMBER_FIELD_FAX)) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
|
||||
if ($this->note && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note;
|
||||
if ($this->note_private && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note_private;
|
||||
if ($this->birth && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->birth,'dayhourldap');
|
||||
if (isset($this->statut) && ! empty($conf->global->LDAP_FIELD_MEMBER_STATUS)) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
|
||||
if ($this->datefin && ! empty($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
/**
|
||||
* \file htdocs/adherents/note.php
|
||||
* \ingroup member
|
||||
* \brief Tabe for note of a member
|
||||
* \brief Tab for note of a member
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -54,7 +54,7 @@ if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$res=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||
$res=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
||||
if ($res < 0)
|
||||
{
|
||||
setEventMessage($object->error, 'errors');
|
||||
@ -82,7 +82,7 @@ if ($id)
|
||||
|
||||
dol_fiche_head($head, 'note', $langs->trans("Member"), 0, 'user');
|
||||
|
||||
print "<form method=\"post\" action=\"note.php\">";
|
||||
print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
@ -129,7 +129,7 @@ if ($id)
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Note
|
||||
// Private note
|
||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($action == 'edit' && $user->rights->adherent->creer)
|
||||
@ -137,12 +137,12 @@ if ($id)
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
print "<input type=\"hidden\" name=\"id\" value=\"".$object->id."\">";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('note',$object->note,'',280,'dolibarr_notes','',true,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,80);
|
||||
$doleditor=new DolEditor('note_private',$object->note_private,'',280,'dolibarr_notes','',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,80);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
{
|
||||
print nl2br($object->note);
|
||||
print dol_htmlentitiesbr($object->note_private);
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
@ -150,7 +150,7 @@ if ($id)
|
||||
{
|
||||
print '<tr><td colspan="4" align="center">';
|
||||
print '<input type="submit" class="button" name="update" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -512,3 +512,6 @@ create table llx_c_price_global_variable_updater
|
||||
next_update integer DEFAULT 0,
|
||||
last_status text DEFAULT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_adherent CHANGE COLUMN note note_private text DEFAULT NULL;
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ create table llx_adherent
|
||||
statut smallint NOT NULL DEFAULT 0,
|
||||
public smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
|
||||
datefin datetime, -- date de fin de validite de la cotisation
|
||||
note text,
|
||||
note_private text DEFAULT NULL,
|
||||
datevalid datetime, -- date de validation
|
||||
datec datetime, -- date de creation
|
||||
tms timestamp, -- date de modification
|
||||
|
||||
@ -25,9 +25,9 @@
|
||||
* \brief Example of form to add a new member
|
||||
*
|
||||
* Note that you can add following constant to change behaviour of page
|
||||
* MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form
|
||||
* MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form
|
||||
* MEMBER_NEWFORM_EDITAMOUNT Amount can be edited
|
||||
* MEMBER_NEWFORM_PAYONLINE Suggest paypemt with paypal of paybox
|
||||
* MEMBER_NEWFORM_PAYONLINE Suggest payment with paypal of paybox
|
||||
* MEMBER_NEWFORM_DOLIBARRTURNOVER Show field turnover (specific for dolibarr foundation)
|
||||
* MEMBER_URL_REDIRECT_SUBSCRIPTION Url to redirect once subscribe submitted
|
||||
* MEMBER_NEWFORM_FORCETYPE Force type of member
|
||||
@ -40,7 +40,7 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||
|
||||
// For MultiCompany module.
|
||||
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
||||
// TODO This should be useless. Because entity must be retreive from object ref and not from url.
|
||||
// TODO This should be useless. Because entity must be retrieve from object ref and not from url.
|
||||
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||
if (is_numeric($entity)) define("DOLENTITY", $entity);
|
||||
|
||||
@ -138,7 +138,7 @@ function llxFooterVierge()
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Action called when page is submited
|
||||
// Action called when page is submitted
|
||||
if ($action == 'add')
|
||||
{
|
||||
// test if login already exists
|
||||
@ -335,7 +335,7 @@ if ($action == 'add')
|
||||
}
|
||||
}
|
||||
|
||||
// Action called after a submited was send and member created succesfully
|
||||
// Action called after a submitted was send and member created successfully
|
||||
// If MEMBER_URL_REDIRECT_SUBSCRIPTION is set to url we never go here because a redirect was done to this url.
|
||||
// backtopage parameter with an url was set on member submit page, we never go here because a redirect was done to this url.
|
||||
if ($action == 'added')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user