diff --git a/app/contacts/app_config.php b/app/contacts/app_config.php index 2c53e9ed50..54e2cea01a 100644 --- a/app/contacts/app_config.php +++ b/app/contacts/app_config.php @@ -459,6 +459,10 @@ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "contact_uuid"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_label"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Custom label for the number"; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_type_voice"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for voice calls."; @@ -475,13 +479,13 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for text messages."; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_label"; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_speed_dial"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Custom label for the number"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the speed dial."; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_primary"; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_country_code"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Designate a primary number."; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the country code."; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_number"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; @@ -491,10 +495,11 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the extension."; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_speed_dial"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the speed dial."; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_primary"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Designate a primary number."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_description"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description."; diff --git a/app/contacts/app_languages.php b/app/contacts/app_languages.php index 6342d6bb37..ea4304ed4f 100644 --- a/app/contacts/app_languages.php +++ b/app/contacts/app_languages.php @@ -1937,6 +1937,28 @@ $text['label-phone_speed_dial']['ru-ru'] = "Быстрый Набор"; $text['label-phone_speed_dial']['sv-se'] = "Snabb Nummer"; $text['label-phone_speed_dial']['uk-ua'] = ""; +$text['label-phone_country_code']['en-us'] = "Country Code"; +$text['label-phone_country_code']['en-gb'] = "Country Code"; +$text['label-phone_country_code']['ar-eg'] = ""; +$text['label-phone_country_code']['de-at'] = ""; //copied from de-de +$text['label-phone_country_code']['de-ch'] = ""; //copied from de-de +$text['label-phone_country_code']['de-de'] = ""; +$text['label-phone_country_code']['el-gr'] = ""; +$text['label-phone_country_code']['es-cl'] = ""; +$text['label-phone_country_code']['es-mx'] = ""; +$text['label-phone_country_code']['fr-ca'] = ""; +$text['label-phone_country_code']['fr-fr'] = ""; +$text['label-phone_country_code']['he-il'] = ""; +$text['label-phone_country_code']['it-it'] = ""; +$text['label-phone_country_code']['nl-nl'] = ""; +$text['label-phone_country_code']['pl-pl'] = ""; +$text['label-phone_country_code']['pt-br'] = ""; +$text['label-phone_country_code']['pt-pt'] = ""; +$text['label-phone_country_code']['ro-ro'] = ""; +$text['label-phone_country_code']['ru-ru'] = ""; +$text['label-phone_country_code']['sv-se'] = ""; +$text['label-phone_country_code']['uk-ua'] = ""; + $text['label-phone_numbers']['en-us'] = "Numbers"; $text['label-phone_numbers']['en-gb'] = "Numbers"; $text['label-phone_numbers']['ar-eg'] = ""; @@ -4445,6 +4467,28 @@ $text['description-phone_speed_dial']['ru-ru'] = "Введите номер бы $text['description-phone_speed_dial']['sv-se'] = "Ange snabbknappens nummer."; $text['description-phone_speed_dial']['uk-ua'] = ""; +$text['description-phone_country_code']['en-us'] = "Enter the country code."; +$text['description-phone_country_code']['en-gb'] = "Enter the country code."; +$text['description-phone_country_code']['ar-eg'] = ""; +$text['description-phone_country_code']['de-at'] = ""; +$text['description-phone_country_code']['de-ch'] = ""; +$text['description-phone_country_code']['de-de'] = ""; +$text['description-phone_country_code']['el-gr'] = ""; +$text['description-phone_country_code']['es-cl'] = ""; +$text['description-phone_country_code']['es-mx'] = ""; +$text['description-phone_country_code']['fr-ca'] = ""; +$text['description-phone_country_code']['fr-fr'] = ""; +$text['description-phone_country_code']['he-il'] = ""; +$text['description-phone_country_code']['it-it'] = ""; +$text['description-phone_country_code']['nl-nl'] = ""; +$text['description-phone_country_code']['pl-pl'] = ""; +$text['description-phone_country_code']['pt-br'] = ""; +$text['description-phone_country_code']['pt-pt'] = ""; +$text['description-phone_country_code']['ro-ro'] = ""; +$text['description-phone_country_code']['ru-ru'] = ""; +$text['description-phone_country_code']['sv-se'] = ""; +$text['description-phone_country_code']['uk-ua'] = ""; + $text['description-phone_number']['en-us'] = "Enter the phone number."; $text['description-phone_number']['en-gb'] = "Enter the phone number."; $text['description-phone_number']['ar-eg'] = ""; diff --git a/app/contacts/contact_edit.php b/app/contacts/contact_edit.php index 8f8217df0b..44c4033fe3 100644 --- a/app/contacts/contact_edit.php +++ b/app/contacts/contact_edit.php @@ -319,13 +319,14 @@ $array['contacts'][0]['contact_phones'][$y]['contact_uuid'] = $contact_uuid; $array['contacts'][0]['contact_phones'][$y]['contact_phone_uuid'] = $row["contact_phone_uuid"]; $array['contacts'][0]['contact_phones'][$y]['phone_label'] = $row["phone_label"]; - $array['contacts'][0]['contact_phones'][$y]['phone_number'] = $row["phone_number"]; - $array['contacts'][0]['contact_phones'][$y]['phone_extension'] = $row["phone_extension"]; - $array['contacts'][0]['contact_phones'][$y]['phone_speed_dial'] = $row["phone_speed_dial"]; $array['contacts'][0]['contact_phones'][$y]['phone_type_voice'] = $row["phone_type_voice"]; $array['contacts'][0]['contact_phones'][$y]['phone_type_fax'] = $row["phone_type_fax"]; $array['contacts'][0]['contact_phones'][$y]['phone_type_video'] = $row["phone_type_video"]; $array['contacts'][0]['contact_phones'][$y]['phone_type_text'] = $row["phone_type_text"]; + $array['contacts'][0]['contact_phones'][$y]['phone_speed_dial'] = $row["phone_speed_dial"]; + $array['contacts'][0]['contact_phones'][$y]['phone_country_code'] = $row["phone_country_code"]; + $array['contacts'][0]['contact_phones'][$y]['phone_number'] = $row["phone_number"]; + $array['contacts'][0]['contact_phones'][$y]['phone_extension'] = $row["phone_extension"]; $array['contacts'][0]['contact_phones'][$y]['phone_primary'] = $row["phone_primary"]; $array['contacts'][0]['contact_phones'][$y]['phone_description'] = $row["phone_description"]; $y++; @@ -657,6 +658,7 @@ $contact_phones[$x]['contact_uuid'] = $contact_uuid; $contact_phones[$x]['contact_phone_uuid'] = uuid(); $contact_phones[$x]['phone_label'] = ''; + $contact_phones[$x]['phone_country_code'] = ''; $contact_phones[$x]['phone_number'] = ''; $contact_phones[$x]['phone_extension'] = ''; $contact_phones[$x]['phone_speed_dial'] = ''; @@ -1600,6 +1602,14 @@ if (permission_exists('contact_phone_view')) { //echo $text['description-phone_extension']."\n"; echo " \n"; + echo "
\n"; + echo " ".$text['label-phone_country_code']."\n"; + echo "
\n"; + echo "
\n"; + echo " \n"; + //echo $text['description-phone_country_code']."\n"; + echo "
\n"; + echo "
\n"; echo " ".$text['label-phone_number']."\n"; echo "
\n"; diff --git a/app/contacts/contact_phone_edit.php b/app/contacts/contact_phone_edit.php index d184461e26..9f73f22d4a 100644 --- a/app/contacts/contact_phone_edit.php +++ b/app/contacts/contact_phone_edit.php @@ -66,6 +66,7 @@ $phone_label = $_POST["phone_label"]; $phone_label_custom = $_POST["phone_label_custom"]; $phone_speed_dial = $_POST["phone_speed_dial"]; + $phone_country_code = $_POST["phone_country_code"]; $phone_number = $_POST["phone_number"]; $phone_extension = $_POST["phone_extension"]; $phone_primary = $_POST["phone_primary"]; @@ -166,6 +167,7 @@ $array['contact_phones'][0]['phone_type_text'] = $phone_type_text ? 1 : null; $array['contact_phones'][0]['phone_label'] = $phone_label; $array['contact_phones'][0]['phone_speed_dial'] = $phone_speed_dial; + $array['contact_phones'][0]['phone_country_code'] = $phone_country_code; $array['contact_phones'][0]['phone_number'] = $phone_number; $array['contact_phones'][0]['phone_extension'] = $phone_extension; $array['contact_phones'][0]['phone_primary'] = $phone_primary ? 1 : 0; @@ -202,6 +204,7 @@ $phone_type_text = $row["phone_type_text"]; $phone_label = $row["phone_label"]; $phone_speed_dial = $row["phone_speed_dial"]; + $phone_country_code = $row["phone_country_code"]; $phone_number = $row["phone_number"]; $phone_extension = $row["phone_extension"]; $phone_primary = $row["phone_primary"]; @@ -319,6 +322,17 @@ echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo " ".$text['label-phone_country_code']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-phone_country_code']."\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo " ".$text['label-phone_number']."\n"; @@ -380,4 +394,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>