diff --git a/app/contacts/app_config.php b/app/contacts/app_config.php
index a3fec532a0..56f8859d3b 100644
--- a/app/contacts/app_config.php
+++ b/app/contacts/app_config.php
@@ -169,14 +169,26 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the organization.";
$z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_name_prefix";
+ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name prefix.";
+ $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_name_given";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the given name.";
$z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_name_middle";
+ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the middle name.";
+ $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_name_family";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the family name.";
$z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_name_suffix";
+ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name suffix.";
+ $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_nickname";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the nickname.";
diff --git a/app/contacts/app_languages.php b/app/contacts/app_languages.php
index 7e39f52c77..af213e00f2 100644
--- a/app/contacts/app_languages.php
+++ b/app/contacts/app_languages.php
@@ -82,6 +82,16 @@
$text['label-contact_name']['pt-pt'] = "Nome";
$text['label-contact_name']['fr-fr'] = "Nom";
+ $text['label-contact_name_prefix']['en-us'] = "Prefix";
+ $text['label-contact_name_prefix']['es-cl'] = "Prefijo";
+ $text['label-contact_name_prefix']['pt-pt'] = "Prefixo";
+ $text['label-contact_name_prefix']['fr-fr'] = "Préfixe";
+
+ $text['description-contact_name_prefix']['en-us'] = "Enter the name prefix.";
+ $text['description-contact_name_prefix']['es-cl'] = "Introduzca el prefijo del nombre.";
+ $text['description-contact_name_prefix']['pt-pt'] = "Digite o prefixo do nome.";
+ $text['description-contact_name_prefix']['fr-fr'] = "Entrez le préfixe de nom.";
+
$text['label-contact_name_given']['en-us'] = "First Name";
$text['label-contact_name_given']['es-cl'] = "Primer Nombre";
$text['label-contact_name_given']['pt-pt'] = "Primeiro Nome";
@@ -92,6 +102,16 @@
$text['description-contact_name_given']['pt-pt'] = "Introduzir o nome";
$text['description-contact_name_given']['fr-fr'] = "";
+ $text['label-contact_name_middle']['en-us'] = "Middle";
+ $text['label-contact_name_middle']['es-cl'] = "Segundo Nombre";
+ $text['label-contact_name_middle']['pt-pt'] = "Nome Do Meio";
+ $text['label-contact_name_middle']['fr-fr'] = "Deuxième Nom";
+
+ $text['description-contact_name_middle']['en-us'] = "Enter the middle name.";
+ $text['description-contact_name_middle']['es-cl'] = "Introduzca el segundo nombre.";
+ $text['description-contact_name_middle']['pt-pt'] = "Digite o nome do meio.";
+ $text['description-contact_name_middle']['fr-fr'] = "Entrez le nom du milieu.";
+
$text['label-contact_name_family']['en-us'] = "Last Name";
$text['label-contact_name_family']['es-cl'] = "Segundo Nombre";
$text['label-contact_name_family']['pt-pt'] = "Último nome";
@@ -102,6 +122,16 @@
$text['description-contact_name_family']['pt-pt'] = "Introduzir o nome de família";
$text['description-contact_name_family']['fr-fr'] = "";
+ $text['label-contact_name_suffix']['en-us'] = "Suffix";
+ $text['label-contact_name_suffix']['es-cl'] = "Sufijo";
+ $text['label-contact_name_suffix']['pt-pt'] = "Sufixo";
+ $text['label-contact_name_suffix']['fr-fr'] = "Suffixe";
+
+ $text['description-contact_name_suffix']['en-us'] = "Enter the name suffix.";
+ $text['description-contact_name_suffix']['es-cl'] = "";
+ $text['description-contact_name_suffix']['pt-pt'] = "";
+ $text['description-contact_name_suffix']['fr-fr'] = "";
+
$text['label-contact_nickname']['en-us'] = "Nickname";
$text['label-contact_nickname']['es-cl'] = "Apodo";
$text['label-contact_nickname']['pt-pt'] = "Nickname";
diff --git a/app/contacts/contact_edit.php b/app/contacts/contact_edit.php
index 04e891d5e0..a4381dee93 100644
--- a/app/contacts/contact_edit.php
+++ b/app/contacts/contact_edit.php
@@ -68,8 +68,11 @@ else {
if (count($_POST)>0) {
$contact_type = check_str($_POST["contact_type"]);
$contact_organization = check_str($_POST["contact_organization"]);
+ $contact_name_prefix = check_str($_POST["contact_name_prefix"]);
$contact_name_given = check_str($_POST["contact_name_given"]);
+ $contact_name_middle = check_str($_POST["contact_name_middle"]);
$contact_name_family = check_str($_POST["contact_name_family"]);
+ $contact_name_suffix = check_str($_POST["contact_name_suffix"]);
$contact_nickname = check_str($_POST["contact_nickname"]);
$contact_title = check_str($_POST["contact_title"]);
$contact_category = check_str($_POST["contact_category"]);
@@ -88,8 +91,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//check for all required data
//if (strlen($contact_type) == 0) { $msg .= $text['message-required'].$text['label-contact_type']."
\n"; }
//if (strlen($contact_organization) == 0) { $msg .= $text['message-required'].$text['label-contact_organization']."
\n"; }
+ //if (strlen($contact_name_prefix) == 0) { $msg .= $text['message-required'].$text['label-contact_name_prefix']."
\n"; }
//if (strlen($contact_name_given) == 0) { $msg .= $text['message-required'].$text['label-contact_name_given']."
\n"; }
+ //if (strlen($contact_name_middle) == 0) { $msg .= $text['message-required'].$text['label-contact_name_middle']."
\n"; }
//if (strlen($contact_name_family) == 0) { $msg .= $text['message-required'].$text['label-contact_name_family']."
\n"; }
+ //if (strlen($contact_name_suffix) == 0) { $msg .= $text['message-required'].$text['label-contact_name_suffix']."
\n"; }
//if (strlen($contact_nickname) == 0) { $msg .= $text['message-required'].$text['label-contact_nickname']."
\n"; }
//if (strlen($contact_title) == 0) { $msg .= $text['message-required'].$text['label-contact_title']."
\n"; }
//if (strlen($contact_role) == 0) { $msg .= $text['message-required'].$text['label-contact_role']."
\n"; }
@@ -119,8 +125,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "contact_uuid, ";
$sql .= "contact_type, ";
$sql .= "contact_organization, ";
+ $sql .= "contact_name_prefix, ";
$sql .= "contact_name_given, ";
+ $sql .= "contact_name_middle, ";
$sql .= "contact_name_family, ";
+ $sql .= "contact_name_suffix, ";
$sql .= "contact_nickname, ";
$sql .= "contact_title, ";
$sql .= "contact_category, ";
@@ -134,8 +143,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'".$contact_uuid."', ";
$sql .= "'".$contact_type."', ";
$sql .= "'".$contact_organization."', ";
+ $sql .= "'".$contact_name_prefix."', ";
$sql .= "'".$contact_name_given."', ";
+ $sql .= "'".$contact_name_middle."', ";
$sql .= "'".$contact_name_family."', ";
+ $sql .= "'".$contact_name_suffix."', ";
$sql .= "'".$contact_nickname."', ";
$sql .= "'".$contact_title."', ";
$sql .= "'".$contact_category."', ";
@@ -196,8 +208,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql = "update v_contacts set ";
$sql .= "contact_type = '".$contact_type."', ";
$sql .= "contact_organization = '".$contact_organization."', ";
+ $sql .= "contact_name_prefix = '".$contact_name_prefix."', ";
$sql .= "contact_name_given = '".$contact_name_given."', ";
+ $sql .= "contact_name_middle = '".$contact_name_middle."', ";
$sql .= "contact_name_family = '".$contact_name_family."', ";
+ $sql .= "contact_name_suffix = '".$contact_name_suffix."', ";
$sql .= "contact_nickname = '".$contact_nickname."', ";
$sql .= "contact_title = '".$contact_title."', ";
$sql .= "contact_category = '".$contact_category."', ";
@@ -238,8 +253,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
foreach ($result as &$row) {
$contact_type = $row["contact_type"];
$contact_organization = $row["contact_organization"];
+ $contact_name_prefix = $row["contact_name_prefix"];
$contact_name_given = $row["contact_name_given"];
+ $contact_name_middle = $row["contact_name_middle"];
$contact_name_family = $row["contact_name_family"];
+ $contact_name_suffix = $row["contact_name_suffix"];
$contact_nickname = $row["contact_nickname"];
$contact_title = $row["contact_title"];
$contact_category = $row["contact_category"];
@@ -457,6 +475,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
echo "\n";
+ echo "