Skip to content
Snippets Groups Projects
Commit cdf0707c authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #6090 from aspangaro/5.0-b1

Fix: Field comments not registered in new member public form & presentation
parents 521eb3a5 cd39b1c6
Branches
Tags
No related merge requests found
...@@ -83,6 +83,9 @@ class Adherent extends CommonObject ...@@ -83,6 +83,9 @@ class Adherent extends CommonObject
var $datevalid; var $datevalid;
var $birth; var $birth;
var $note_public;
var $note_private;
var $typeid; // Id type adherent var $typeid; // Id type adherent
var $type; // Libelle type adherent var $type; // Libelle type adherent
var $need_subscription; var $need_subscription;
...@@ -411,6 +414,8 @@ class Adherent extends CommonObject ...@@ -411,6 +414,8 @@ class Adherent extends CommonObject
$this->state_id=($this->state_id > 0?$this->state_id:$this->state_id); $this->state_id=($this->state_id > 0?$this->state_id:$this->state_id);
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname)); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname));
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords(trim($this->firstname)); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords(trim($this->firstname));
$this->note_public=($this->note_public?$this->note_public:$this->note_public);
$this->note_private=($this->note_private?$this->note_private:$this->note_private);
// Check parameters // Check parameters
if (! empty($conf->global->ADHERENT_MAIL_REQUIRED) && ! isValidEMail($this->email)) if (! empty($conf->global->ADHERENT_MAIL_REQUIRED) && ! isValidEMail($this->email))
...@@ -440,7 +445,7 @@ class Adherent extends CommonObject ...@@ -440,7 +445,7 @@ class Adherent extends CommonObject
$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.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
$sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null"); $sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
$sql.= ", note_public=" .($this->note_private?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ", note_public=" .($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
$sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null"); $sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null");
$sql.= ", public='".$this->public."'"; $sql.= ", public='".$this->public."'";
$sql.= ", statut=" .$this->statut; $sql.= ", statut=" .$this->statut;
......
...@@ -238,11 +238,10 @@ if ($action == 'add') ...@@ -238,11 +238,10 @@ if ($action == 'add')
$adh->pass = $_POST["pass1"]; $adh->pass = $_POST["pass1"];
} }
$adh->photo = $_POST["photo"]; $adh->photo = $_POST["photo"];
$adh->note = $_POST["note"];
$adh->country_id = $_POST["country_id"]; $adh->country_id = $_POST["country_id"];
$adh->state_id = $_POST["state_id"]; $adh->state_id = $_POST["state_id"];
$adh->typeid = $_POST["type"]; $adh->typeid = $_POST["type"];
$adh->note = $_POST["comment"]; $adh->note_private= $_POST["note_private"];
$adh->morphy = $_POST["morphy"]; $adh->morphy = $_POST["morphy"];
$adh->birth = $birthday; $adh->birth = $birthday;
...@@ -520,7 +519,7 @@ foreach($extrafields->attribute_label as $key=>$value) ...@@ -520,7 +519,7 @@ foreach($extrafields->attribute_label as $key=>$value)
// Comments // Comments
print '<tr>'; print '<tr>';
print '<td valign="top">'.$langs->trans("Comments").'</td>'; print '<td valign="top">'.$langs->trans("Comments").'</td>';
print '<td valign="top"><textarea name="comment" wrap="soft" cols="60" rows="'.ROWS_4.'">'.dol_escape_htmltag(GETPOST('comment')).'</textarea></td>'; print '<td valign="top"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note_private')).'</textarea></td>';
print '</tr>'."\n"; print '</tr>'."\n";
// Add specific fields used by Dolibarr foundation for example // Add specific fields used by Dolibarr foundation for example
......
...@@ -95,10 +95,10 @@ if ($id > 0) ...@@ -95,10 +95,10 @@ if ($id > 0)
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">'.nl2br($object->address).'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">'.nl2br($object->address).'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Zip").' '.$langs->trans("Town").'</td><td class="valeur">'.$object->zip.' '.$object->town.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$object->zip.' '.$object->town.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">'.$object->country.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">'.$object->country.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.$object->email.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.$object->email.'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.$object->birth.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
if (isset($object->photo) && $object->photo !='') if (isset($object->photo) && $object->photo !='')
{ {
...@@ -111,7 +111,7 @@ if ($id > 0) ...@@ -111,7 +111,7 @@ if ($id > 0)
// print "<tr><td>$value</td><td>".$object->array_options["options_$key"]."&nbsp;</td></tr>\n"; // print "<tr><td>$value</td><td>".$object->array_options["options_$key"]."&nbsp;</td></tr>\n";
// } // }
print '<tr><td valign="top">'.$langs->trans("Comments").'</td><td>'.nl2br($object->note).'</td></tr>'; print '<tr><td valign="top">'.$langs->trans("Comments").'</td><td>'.nl2br($object->note_public).'</td></tr>';
print '</table>'; print '</table>';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment